2
我有一个.php注册用户通过调用另一个php函数,但我不知道什么是最好的方式来重定向用户,如果注册成功。除了header incase之外,还有其他选项吗?我想在我重定向之前回显一些内容。成功登录php后重定向
<?
// processRegister.php
//////////////////////
// First include the class definition
include('UserClass.php');
// Next, create an instance of the class
$newUser = new User;
// Call the registerUser() method, passing in the required variables
$newUser->registerUser($userName, $userPassword);
// If it was an error, the class will kill the script, if not, it will reach this point
$newUser->displayUserInfo();
?>
那么我回声出元? – user1082764 2012-01-16 00:37:19
是的 - 如果你回应,你可以重定向。我错过了另一种使用Javascript的方式。我补充说。 – 2012-01-16 00:38:22
恕我直言,只有第一应该是**曾经**使用。为什么应该等待用户加载页面,然后再等到JS完成执行:) – veritas 2012-01-16 00:42:19