this is my code that i am using to submit form with post value
<form action="<?php echo DOMAIN; ?>contact/booking-form.php" method="post">
<input type="text" name="name" value="<?php echo $name; ?>" />
<input type="text" name="email" value="<?php echo $email; ?>" />
<input type="submit" name="submit" id="submit" />
A submit button is only going to be a successful control if it is used to submit the form (and even then only if it has a name and a value … which yours does not).
If you want
<input type="submit"> <input type="hidden" name="submit" id="submit" value="submit">
Then you have two other problems.
First, submit is a method of form elements, not inputs. So you need to change your script to call the right element.
Second, if a form has a control called
submit then that will clobber the
submit method. So you need to get one from a different form (not supported in old versions of Internet Explorer):
<script> var form = document.getElementById('submit').form; var submit_method = document.createElement("form").submit; submit_method.call(form); </script>