Skip to content

Instantly share code, notes, and snippets.

Created October 24, 2016 19:14
Show Gist options
  • Save anonymous/f7f1106b804bb543036c90031aa0d972 to your computer and use it in GitHub Desktop.
Save anonymous/f7f1106b804bb543036c90031aa0d972 to your computer and use it in GitHub Desktop.
$("#orderForm").submit(function (event) {
$.ajax({
type: "POST",
url: "<?php bloginfo('stylesheet_directory')?>/formvalidate.php",
/*data: formData,*/
/* dataType: 'json',*/
encode: true
}).done(function (data) {
alert(data);
}).fail(function (xhr, status, error) {
alert("fail "+error.toString());
});
event.preventDefault();
});
// new WOW().init();
});
<?php
$name = $_POST["oName"];
echo $name;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment