Howdy,

I'm doing a simple db check.. grabbing a db value, in this case $sec, based
on the user name registered in the session,
I've created a user called test with $sec  equal to "2" but when i get to
the second echo of $sec the value has changed to "1" and I can't understand
why... can some one please give me some idea as to why this is happening?

elseif ($_POST['cost'] >=100001){
//query db
$res = mysql_query("SELECT sec FROM users WHERE uname='$_SESSION[uname]'");
$num = mysql_numrows($res) ;
if ($num == 1) {
//get results
$sec = mysql_result($res, 0, 'sec');
echo $sec; // pulls out sec as 2 ( as is sposed to )
}
if (!$sec = "1"){

Right there. Should be...

if ($sec != "1"){


--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to