Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.