form action on same page in php
<form action="<php echo $_SERVER['php_shelf'] ?>" method="POST">
<--
Your inputs here
--!>
</form>
<?php
if(isset($_POST['your input name']){
$input = $_POST['input name'];
}
?>
form action on same page in php
<form action="<php echo $_SERVER['php_shelf'] ?>" method="POST">
<--
Your inputs here
--!>
</form>
<?php
if(isset($_POST['your input name']){
$input = $_POST['input name'];
}
?>
how to redirect to another page in php after submit
Right after @mail($email_to, $email_subject, $email_message, $headers);
header('Location: nextpage.php');
Note that you will never see 'Thanks for subscribing to our mailing list'
That should be on the next page, if you echo any text you will get an error because the headers would have been already created, if you want to redirect never return any text, not even a space!
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us