query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "admin.php" $_SESSION['myusername'] =$myusername; $_SESSION['mypassword'] =$mypassword; //session_register("myusername"); //session_register("mypassword"); echo ""; } else { echo ""; } ?>