Hello
my login code is not working, i couldn't find the problem yet, please help:
<?php
if($_POST){
$_SESSION['username']=trim($_POST["user"]);
$_SESSION['password']=trim($_POST["pass"]);
}
//check if the username and password exist or not
$result=mysql_query("select * from `members` where user COLLATE latin1_bin ='" . $_SESSION['username'] . "' AND pass COLLATE latin1_bin ='" . $_SESSION['password'] . "'");
// retrieve number of rows resulted
$num=mysql_num_rows($result);
$row = mysql_fetch_array($result);
// print login form and exit if failed.
if($num > 1){
if ($row[reseller] == 'Y') {
//display smthg related to reseller
} else {
// user not a reseller
}
} // end if num>1
else {
echo "user not found";
}
?>
i am getting user not found. WHY?
Thank you