nightkarnation Posted September 25, 2008 Share Posted September 25, 2008 Hey...please take a loot at: // after login we move to the main page header('Location: login.php'); after all the login process is done and user and password is correct, i want to send the user to login.php header('Location: login.php'); is not working, what am i doing wrong ? if (mysql_num_rows($result) == 1) { // the user id and password match, //sends la variable result a flash y avisa que esta conectado: echo "'You are Logged In!"; // after login we move to the main page header('Location: login.php'); exit; } else { echo "'Sorry, wrong user id and/or password'"; echo "&user_id=".$user_id."&"; echo "&password=".$password."&"; } Thanx in advance for your reply! cheers, Link to comment https://forums.phpfreaks.com/topic/125847-easy-question-after-login-succesful-go-to-another-php/ Share on other sites More sharing options...
DarkWater Posted September 25, 2008 Share Posted September 25, 2008 Add: <?php ini_set('display_errors', 1); error_reporting(E_ALL); ?> To the top of your PHP page. This will show you the error. It results from sending output before a call to header(). You cannot send ANYTHING to the browser before you call header(). Link to comment https://forums.phpfreaks.com/topic/125847-easy-question-after-login-succesful-go-to-another-php/#findComment-650743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.