New to the header
This post was last edited by Kerrylovelj on 2015-01-24 11:37:09
Recently in the study, encountered the form of repeating the problem of submission. Later Baidu search to use the header ("Location: $post");
My form is presented to this page, this page gets the $_post value to form the SQL statement, and the last function executes the SQL statement.
$sql = "...";//Compose SQL statement 1
Exeupdate ($sql);//write your own execution function 2
Header ("Location: $post");//Jump 3
Originally I thought the normal execution order is the one-time and then converted back to this page, because this page through the session value can obtain the data, therefore can see the immediate data update situation.
But after I put 2 3 upside down, the data can still be updated. What is this for?
------to solve the idea----------------------
After the header, he would still execute the following code, not explaining your question.
Take a EXIT.
------to solve the idea----------------------
The header simply sends an HTTP protocol header
Does not interrupt the execution of the current program
------to solve the idea----------------------
Like upstairs said the header just sends an HTTP protocol header
Before jumping, he will also go down, general jump and exit (); Use with