SitePoint Enthusiast
Login Form Help (I'm a php noob)
http://paste.devpipe.com/1514
Whats wrong with the code above? It works untill it has to query the database.. The mysql connection script is working fine so its something to do with this script!
Thanks
SitePoint Enthusiast
$sql = mysql_query("SELECT * FROM tblUsers WHERE username = '".$username."' and password = '".$password."'") or die(mysql_error());
$row = mysql_fetch_array($sql);
if(mysql_num_rows($sql) < 1) {
echo 'Sorry, user not found';
}else{
echo 'Success';
}
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks