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