How to implement php to jump to the previous page: 1. Use the "history.back();" method to realize the jump; 2. Use the "javascript:window.location.hre" method to realize the jump; 3. , use the "location.href" method to jump to the previous page.
Recommended: "PHP Video Tutorial"
php implementation to return to the previous page
//php实现返回上一个页面不刷新 <?php echo "<script>alert('退出成功!');history.back();</script>"; ?> //返回上一个页面并刷新,只是吧当前页面的url替换成上一个页面而已 </php echo "javascript:window.location.href=document.referrer;"; ?> //或者 echo "<script>alert('退出成功!');location.href='".$_SERVER["HTTP_REFERER"]."';</script>";
The above is the detailed content of How to jump to the previous page in php. For more information, please follow other related articles on the PHP Chinese website!