Php bullet box
If ($ mail-> Send () {echo "script" alert ('success ') script "; header (" Location: homeConnect. php ");} else {echo" script "alert ('failed') script"; header ("Location: homeConnect. php ");}
No dialog box is displayed, no matter whether it succeeds or fails.
Expected effect: the pop-up box information is displayed, and the user jumps after clicking OK
Reply to discussion (solution)
To change it to this
Echo "script" alert ('failed') script ";
Echo "script location: homeConnect. php script";
Header ("Location: homeConnect. php ");
A jump command is generated in the http header, so the jump occurs before the script is executed.
To change it to this
Echo "script" alert ('failed') script ";
Echo "script location: homeConnect. php script";
Header ("Location: homeConnect. php ");
A jump command is generated in the http header, so the jump occurs before the script is executed.
Not redirected
Echo "script location. href = 'homeconnect. php'; script";
Jump with script