On Thu, 2005-11-03 at 18:37 -0500, Unknown Unknown wrote: > Hi everyone, i have some code that proccesses a login form. i have an object > $DB which works only in SOME areas, this is the code: > > <?php > require_once("Include.php"); > global $DB; There is no need to global $DB here. You are already in the global scope. > $Username= $_REQUEST['Username']; > $Password= $_REQUEST['Password']; > $SQL=" SELECT * FROM members WHERE Username='$Username' AND > Password='$Password'; "; > $DB->Query($SQL); > $UserInfo=$DB->QueryInfo("Array"); > if($UserInfo==0) $Login="FALSE"; > else $Login="TRUE"; Why aren't you using real boolean values here? > //Make Sure the user is not a duplicate user trying to log in again > if($Login="TRUE") > { > global $DB; Again, no need to global $DB. You are still in the global scope. > $RL="__"; > $LoginD="__"; > $ID=$UserInfo['ID']; > echo $ID; > $DB="membersp"; Here is your problem. You just replaced the $DB object with a string. Maybe you meant to set a property on the $DB object? I think you may need to do some reading on OOP, perhaps start at http://php.net/oop for PHP4 or http://php.net/oop5 for PHP5. -- Jasper Bryant-Greene General Manager Album Limited e: jasper@xxxxxxxxxxx w: http://www.album.co.nz/ b: http://jbg.name/ p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 a: PO Box 579, Christchurch 8015, New Zealand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php