Reply to thread

My Header still doesn't work.   I don't see where it is outputing any information.    

<?php


 

$uname=htmlspecialchars($_POST['drivername']);

$pword=htmlspecialchars($_POST['driverpassword']);


$user_name='nreddin';

$password='';

$database='rides';

$server='localhost';



$conn=mysql_connect($server,$user_name);



$db=mysql_select_db($database, $conn);

if($db){

$SQL="SELECT*FROM login WHERE L1='$uname' AND L2='$pword' " ;           $result=mysql_query($SQL);

if($result){

$num_rows=mysql_num_rows($result);

if ($num_rows > 0) {

session_start();

$_SESSION['login'] = "1";

header ("Location:welcomepg.htm");

}

else {

$errorMessage = "Invalid Login";

session_start();

$_SESSION['login'] = '';

}



}

?>


I have revised it,  but it still does not work.  Is it true  that my cookies need to function?  I think they do.  What other things in my apache need to be turned on ????


The entire script is a login script,   it takes a simple  username and password form    to check it vs  the  login table   in rides  database.     I know that it is  returning a value of  1 for $num_rows.   Why doesn't the server redirect a user to the welcome page upon a successful login.  

PLZ  Help????

(with possible suggestions for changes to my script :D:D:D)


Back
Top