At the moment, I have a form with an input (text) and a button to submit the form.
The form is posted to \'submit.php\'. I would like the form posted to same page as th
I think you have a couple of options here.
<?php
if('POST' == $_SERVER['REQUEST_METHOD']) {
// process the form here
}
?>
<form action="" method="POST">
<input type="text" class="emailField" placeholder="email address" name="email" />
<button type="submit">
<div class="submit" />
</button>
</form>
Add something like this in submit.php
where you want to show the form.
<?php
header('Location: http://example.org/form.php');
exit;
?>