This article provides a detailed analysis of PHP redirection after submission. For more information, see
The code is as follows:
// ====================================== Define redirect () start = //
/**
* Defines the redirect () jump function, which is used to jump to the specified page as required after User Operations
*
* @ Param unknown_type $ ms is the number of seconds required for redirect.
* @ Param unknown_type $ url specifies the jump address
* @ Param unknown_type $ text: displays the jump information.
*/
Function redirect ($ ms = '', $ url ='', $ text = ''){
Echo <
Page Operation Prompt |
$ Text |
This page automatically jumps after $ ms seconds. if your browser does not jump, click this link to return. |
|
EOT;
}
// ====================================== Define redirect () end ====================================== //
?>
When used:
Redirect ('2', 'adduser. php', 'added users successfully! Return later! ');
2 indicates the number of seconds. adduser. php indicates the page to jump to. "The user has been added successfully! Return later! "Is the information displayed during the jump wait!