Re: Not sure about this...

From: Date: Fri, 26 Jul 2002 15:59:20 +0000
Subject: Re: Not sure about this...
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-20823@lists.php.net to get a copy of this message
Ooops, sorry about that here you go, /* Error message */ Column count doesn't match value count at row 1 /* Code to query db for username and password */ require '/home/bignickel.net/scripts/admin/db.php'; $db_table = 'auth_users'; $sql = "SELECT * from $db_table WHERE un = \"$u_name\" AND pw = password(\"$p_word\")"; $result = @mysql_query($sql,$dbh) or die('Cannot execute query, please try again later or contact the system administrator by email at support@domain.net'); /* Loop through records for matching pair */ $num = mysql_numrows($result); if ($num !=0) { print "You have a valid username and password combination"; } else { header("Location: blank.php"); } /* Table structure of db */ CREATE TABLE auth_users ( user_id int(11) NOT NULL auto_increment, f_name varchar(255) default NULL, l_name varchar(255) default NULL, email_addy varchar(255) default NULL, un text, pw text, PRIMARY KEY (user_id) ) TYPE=MyISAM;

« previous php.db (#20823) next »