我现在要实现一个 注册的时候 点击“上一步” 可以返回上一页 修改注册的信息 显示之前注册的信息我是用ASSIGN把SEESION保存的变量置换实现的但返回到下面这个PHP页面 这个页面设计到验证码的处理 会提示 验证码错误 怎样判断是点击“上一步” 而不是 点击“下一步”到这个页面的呢 (点击下一步的时候 我把FORM的ACTION链接设为下面的PHP页面 而“上一步”是通过BUTTON 的ONCLICK实现的 链接也是这个PHP页面)
请各位高手指点
if (isset($_SESSION['code']) && $_POST['txtCode'] == $_SESSION['code']) //处理验证码错误问题
{
$this->m_smarty->set_template_dir('modules/Company/_templates');
$this->m_smarty->display("Manager.tpl");
}
else {
echo "<script>";
echo "alert('验证码输入有误,请返回重新填写');window.location='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterInfo';";
// echo "window.location.href='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterInfo'" ;
echo "</script>";
}
请各位高手指点
if (isset($_SESSION['code']) && $_POST['txtCode'] == $_SESSION['code']) //处理验证码错误问题
{
$this->m_smarty->set_template_dir('modules/Company/_templates');
$this->m_smarty->display("Manager.tpl");
}
else {
echo "<script>";
echo "alert('验证码输入有误,请返回重新填写');window.location='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterInfo';";
// echo "window.location.href='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterInfo'" ;
echo "</script>";
}
{
$this->m_smarty->set_template_dir('modules/Company/_templates');
$this->m_smarty->display("Manager.tpl");
}
else {
echo "<script>";
echo "alert('验证码输入有误,请返回重新填写');window.location='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterInfo';";
// echo "window.location.href='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterInfo'" ;
echo "</script>";
}加了一个 $_POST['return_button']=="返回上一步" 条件
'return_button' 所在FORM表单 POST方法 <input TYPE="button" name="return_button" VALUE="<{$APP_STRING.APP_BUTTON_BUTTON}>" ONCLICK="location.href='http://localhost/UmasoftFrw2/index.php?module=Company&submodule=RegisterInfo&action=RegisterOne'">
的值呢