I have made a login form using PHP and MySQL. However, I am running into an error when I type in the wrong login info.
<?php
while($row = mysql_fetch_array($result))
{
if($result)
{
header('Location: supplementsstore.php');
}
else
{
header('Location: logon.php');
}
}
?>
The if works as it's supposed to, but it does not do the else statement.
I have tried changing else to !$result but that didn't work either.
if($result)?exitis missing for guarantee.