Jump to content

im very new


klaasS

Recommended Posts

$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);

Link to comment
https://forums.phpfreaks.com/topic/53443-im-very-new/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/53443-im-very-new/#findComment-264210
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/53443-im-very-new/#findComment-264230
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.