Ok, I entered this line:
$sql = "SELECT * FROM `affiliates` WHERE aff='$us' and pass='". md5($pa) ."'";
and received this message:
SELECT * FROM affiliates WHERE aff='az' and pass='202cb962ac59075b964b07152d234b70'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/path/to/login/index.php on line 61
Invalid Password For This Username!
Now, the password in the db is stored like
d41d8cd98f00b204e9800998ecf8427e
and line 61 is
if(mysql_num_rows($login) == 0) {
Not sure if this will help, but this is the script that stores the user name and password in the db:
<?
require "aff.php";
$p = (md5($pass));
mysql_connect($host,$usr,$pwd);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO affiliates VALUES ('','$firstname','$lastname','$email','$street','$city','$state','$zip','$website','$aff','$p')";
mysql_query($query);
mysql_close();
?>