Hi Paul, On 07-09-21 20:47 +0100, PaulCheung wrote: > $access_code = $access_code - $access_code;
i don't understand what your intent is with the above line.. setting $access_code to 0? (it's not your problem, i am just curious) > $rs = mysql_query( $sql, $conn ) or die( "Could not execute query" ); > > $num = mysql_numrows( $rs ); > > if( $num != 0 ) > { $access_code = access_code; the above line looks to me like $access_code is being assigned the value of the undefined constant access_code, which php will assume is intended to be the string 'access_code' i think you want $access_code = $rs['access_code'] _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php