As the title said:
Is it possible to send an email (using php mail()) and after sending the email, auto redirect to another page. All the codes will be in single php file?
Code-wise, should be something like this:
if(mail(argument...)){
header("Location: www.google.com");
}
I think I would get a: “Error: header information already sent” or something like. But what if I want to send email and then auto-redirect on that page?? Possible?
This error:
usually caused by having white space before the opening and closing PHP tags or something was printed to the browser before preparing the page.
If this is the only code you have
it will work because you are not printing anything to the browser but be sure to avoid including white spaces.