DB Select

From: Date: Mon, 20 Nov 2000 11:05:25 +0000
Subject: DB Select
Groups: php.windows 
Request: Send a blank email to php-windows+get-3987@lists.php.net to get a copy of this message
I am using the following script to select stuff from a database. <? mysql_connect("$db_host", "$db_user", "$db_pass"); $query = "SELECT * FROM users where LoginName = '$user' and Active = 'Yes'"; $result = mysql_db_query("$db_name", $query); if ($result) { while ($r = mysql_fetch_array($result)) { $FullName = $r["FullName"]; $Email = $r["Email"]; $LoginName = $r["LoginName"]; $Password = $r["Password"]; $Address = $r["Address"]; $Telephone = $r["Telephoene"]; $Active = $r["Active"]; echo " $LoginName<BR>$Active "; } } else { echo "Account Not Active"; } mysql_free_result($result);?> The database is a user login database. When they create an account, it sets the Active field to no, and they have to follow a lonk sent to them by E-Mail to active the account. I want the above script to say Account not active when they try to login using an account that hasn't been actovated by following the E-Mailed link. But, it doesn't, it just returns a blank page. What am I doing wrong? The DB_xxx variables are read from a conf file, and the $user is read from the url -- Ben Cairns, Head Of Technical Operations, Intasept.com E-Mail: BenC@intasept.com | Web: http://www.intasept.com

« previous php.windows (#3987) next »