From c0b31b0cd739260ca543b49eee5e26119c862403 Mon Sep 17 00:00:00 2001 From: zhegal Date: Fri, 5 Jan 2018 18:18:57 +0200 Subject: [PATCH] submit --- blocks/footer_endhtml.php | 2 +- blocks/modal.php | 22 +++++++++++----------- js/submit.js | 6 +++--- submit.php | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 15 deletions(-) create mode 100644 submit.php diff --git a/blocks/footer_endhtml.php b/blocks/footer_endhtml.php index 0c0af79..4c2516c 100644 --- a/blocks/footer_endhtml.php +++ b/blocks/footer_endhtml.php @@ -202,7 +202,7 @@ _________________________________________________________ --> - + \ No newline at end of file diff --git a/blocks/modal.php b/blocks/modal.php index e16a101..8823c26 100644 --- a/blocks/modal.php +++ b/blocks/modal.php @@ -60,36 +60,36 @@
- +
- +
- +
- +
- - + +
- - + +
diff --git a/js/submit.js b/js/submit.js index f2448c6..a8229eb 100644 --- a/js/submit.js +++ b/js/submit.js @@ -16,11 +16,11 @@ $( if (validate(dataArray)) { $.ajax( { - url: 'http://artbox.net.ua/en/feedback', + url: 'submit.php', type: "POST", data: dataArray, success: function(data) { - if (data.status) { + //if (data.status) { form.reset(); var pos = ($(window) .scrollTop() + 30 + 50); @@ -43,7 +43,7 @@ $( top: pos }, 200 ); - } + //} } } ); diff --git a/submit.php b/submit.php new file mode 100644 index 0000000..d966374 --- /dev/null +++ b/submit.php @@ -0,0 +1,37 @@ + $name, + 'email' => $email, + 'phone' => $phone, + 'message' => $message + ); + $result = file_get_contents($url, false, stream_context_create(array( + 'http' => array( + 'method' => 'POST', + 'header' => 'Content-type: application/x-www-form-urlencoded', + 'content' => http_build_query($params) + ) + ))); + } \ No newline at end of file -- libgit2 0.21.4