hi all first off all am new,,, i develop login form by php and my database is mysql data but the proplem i can not go to the next page when i write the correct user name and password ,,how i can link it to the next page i write the code to show me what is the error please i realy need it
<?php
if( (!$username) or (!password) )
{ header("Locatio n:$HTTP_REFERER "); exit();}
$conn=@mysql_co nnect("localhos t","","")
or die("Could not connection");
$rs=@mysql_sele ct_db("java_db" , $conn)
or die("Could not select database");
$uid= $_POST["username"];
$pwd= $_POST["password"];
$sql="select * from login where usname='$uid'
and pass= '$pwd'";
//echo $sql;
$rs=mysql_query ($sql,$conn)
or die("query not work correctly");
$num= mysql_numrows($ rs);
if($num != 0)
{ $msg="welcome $username - your log in
succeeded!"; }
// else
//{header("Locati on:C:\ash work\Object.htm l");
exit(); }
?>
<body> <?php echo($msg); ?> </body>
<?php
if( (!$username) or (!password) )
{ header("Locatio n:$HTTP_REFERER "); exit();}
$conn=@mysql_co nnect("localhos t","","")
or die("Could not connection");
$rs=@mysql_sele ct_db("java_db" , $conn)
or die("Could not select database");
$uid= $_POST["username"];
$pwd= $_POST["password"];
$sql="select * from login where usname='$uid'
and pass= '$pwd'";
//echo $sql;
$rs=mysql_query ($sql,$conn)
or die("query not work correctly");
$num= mysql_numrows($ rs);
if($num != 0)
{ $msg="welcome $username - your log in
succeeded!"; }
// else
//{header("Locati on:C:\ash work\Object.htm l");
exit(); }
?>
<body> <?php echo($msg); ?> </body>
Comment