Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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!
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #redirect #page #php #submit
ADD COMMENT
Topic
Name
7+5 =