I have my process login set up, but when I'm trying to change rows to 0 nothing appears so i keep on having to leave the code as 1.
<?session_start();
$usid=$_SESSION["usersid"];
include "conninfo.php";
$username=$_POST["username"];
$password=$_POST["password"];
$username = stripslashes($username);
$password = stripslashes($password);
$query="SELECT *
FROM login
WHERE username like '$username' AND
password like '$password'";
$result=mysql_query($query);
$rows=mysql_num_rows($result);
if($rows==1)// change to 0 once login is working
{
$_SESSION["username"]=$username; //greeting
$r=mysql_fetch_array($result);
$usersid=$r["usersid"];
$_SESSION["usersid"]=$usersid;
header('Location: index.php');
} else {
echo "The username and or password you have entered is not recognised";
}
?>