#1: this is an extremely insecure way to do things, but let’s move on. #2: Print out those session variables on the two lines above, so you can verify the vaues of them. Also, print out the $sql variable. Then you’ll have three strings to debug with on each entry, so you can verify it does or does not work. #3: Once you have the $sql string, just type that into mysql, via copy/paste, and see if it returns what you want. Hope this helps Take care, Sina From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of BlueScale Sent: Thursday, August 07, 2008 2:04 AM To: programmingblind@xxxxxxxxxxxxx Subject: mysql query not working Hi, I keep not getting what I am expecting. I enter data I know is in the database and still get an error. Can someone tell me if there is something wrong with this bit of code? $sql = "SELECT * FROM members WHERE email_address = '" . $_SESSION["email"] . "' AND pass_word = '" . $_SESSION["psswd"] . "'"; $row = mysql_fetch_assoc($sql); Thanks BlueScale