Jump to content

Easy question, after login succesful go to another php


nightkarnation

Recommended Posts

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,

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().

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.