
January 28th, 2004, 02:26 AM
|
|
Contributing User
|
|
Join Date: Sep 2003
Posts: 117
Time spent in forums: 2 h 30 m 29 sec
Reputation Power: 6
|
|
|
matching prob
hi guys,
i used this code to validate whether username and password are valid or not before allow the visitors to access members' area,,, but the problem is now it seems like only check the password and not username... even i simply put a username but with a valid password, i am allow to access the section as well.. did i miss something in my code ??? why it doesn't match the username and password ??
my code:
$sql = mysql_query("SELECT * FROM `info` WHERE `username`='$username' AND `password`='$password'") or die(mysql_error());
//$login_check = mysql_num_rows($sql);
if(mysql_num_rows($sql)>0){
please advise..
|