redirecting from a page to another one
This question already has an answer here:
You can just use the header() function of PHP. But be sure that there is NO output before the header()
call or it will fail.
if(HERE YOUR CONDITION) {
header("Location: confirm.php");
}
ob_clear(); //Make sure you've done ob_start() or not output anything to the browser
header('Location: confirm.php');
exit;
put header("Location: confirm.php"); in your if condition .
链接地址: http://www.djcxy.com/p/34722.html上一篇: php代码不会将我重定向到页面
下一篇: 从一个页面重定向到另一个页面