我最近才改变的事情是将register_globals转为关闭
以下是登录脚本的结束:
$from = $_POST['from']; //convert form element to var
//echo "got here, from is $from"; die;
// test to prove $from is empty
if($from == '')
{
$from = '/pages/reg2.html';
}
header("Location: $from"); // this should redirect page
答案 0 :(得分:0)
尝试此代码应该正常工作
<?php
if (isset($_POST['from']) && !empty($_POST['from'])) {
$from = $_POST['from']; //convert form element to var
//echo "got here, from is $from"; die;
// test to prove $from is empty
}
if(empty($from))
{
$from = '/pages/reg2.html';
}
//if still doesnt work try to replace this line with : echo $from; exit();
//just for you to know at what point you are .
header("Location: $from");
exit();
?>