klaasS Posted May 29, 2007 Share Posted May 29, 2007 $sql_email_check=mysql_query("SELECT * FROM `user_register` where email_address='$email_address'"); $num_email_check=mysql_num_rows($sql_email_check); $sql_pass_check=mysql_query("SELECT * FROM `user_register` where pass='$pass'"); $num_pass_check=mysql_num_rows($sql_pass_check); hi i whant that $sql_pass_check take 2 things from my database thit is what i fink butt dont now of thit the right code is or must i do this differnt can somebody help me with this $sql_pass_check=mysql_query("SELECT * FROM `user_register` where pass='$pass''$email_address'"); $num_pass_check=mysql_num_rows($sql_pass_check); Quote Link to comment https://forums.phpfreaks.com/topic/53443-im-very-new/ Share on other sites More sharing options...
wildteen88 Posted May 29, 2007 Share Posted May 29, 2007 You're almost there. It should be this: $sql_pass_check=mysql_query("SELECT * FROM `user_register` WHERE pass='$pass' AND email_address='$email_address'"); $num_pass_check=mysql_num_rows($sql_pass_check); Notice the correction is highlighted in red above. Quote Link to comment https://forums.phpfreaks.com/topic/53443-im-very-new/#findComment-264210 Share on other sites More sharing options...
saf Posted May 29, 2007 Share Posted May 29, 2007 Okay...very hard to understand from the butchered english but from what I understood, you either want the database to give you two things (e.g. you give it a password and it returns a username and an e-mail for that specific password) or you are testing for two things (e.g. you give it a password and an email and you want it to give you everything in the row that has the specific password and email combination). Which one are you trying to accomplish? (please write more legibly) Saf Quote Link to comment https://forums.phpfreaks.com/topic/53443-im-very-new/#findComment-264230 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.