How to jump back to the previous page in php: 1. Use the header function, the code is [header(location: the path of your previous page);]; 2. Use js to jump, the code is [ javascript:history.back(-1);].
【Related learning recommendations: php programming(Video)】
How to jump back to the previous page in php:
3 effective methods for php to implement the function of returning to the previous page
Use header function:
header(location:你的上一页的路径);
// Note that there can be no output before this function
header(location:.getenv("HTTP_REFERER"));
// Return to its calling page
echo"<script>alert('随便写点什么');history.go(-1);</script>";
below This is js
javascript:history.back(-1);
Relevant learning recommendations: js video tutorial, js tutorial (picture and text)
The above is the detailed content of php jump back to previous page. For more information, please follow other related articles on the PHP Chinese website!