Search
 
SCRIPT & CODE EXAMPLE
 

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!
Comment

PREVIOUS NEXT
Code Example
Php :: laravel one session per user 
Php :: laravel backup 
Php :: error 500 internal server error in laravel 
Php :: db seed in controller 
Php :: PHP strtolower — Make a string lowercase 
Php :: get file request in laravel 
Php :: php print object 
Php :: laravel validation types 
Php :: php dirpath multiple file extensions 
Php :: symfony messenger config 
Php :: convert png to webp in php 
Php :: how to get the root domain in laravel 
Php :: rewrite url to exclude php extension 
Php :: php implode associative array 
Php :: rule for radio button in laravel 
Php :: php mail template 
Php :: clear session in laravel 
Php :: laravel form validation based on another field value 
Php :: php Program to check if a given year is leap year 
Php :: extend woocommerce user fields edit-account 
Php :: two column date compare in php 
Php :: strpos php 
Php :: Download any version of xampp 
Php :: php json_encode float 
Php :: how to run a php file in xampp 
Php :: Redirect action to certain controller method in Laravel 
Php :: laravel middleware 
Php :: set cookie on button click JavaScript 
Php :: static class methods php 
Php :: php ksort 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =