Jump to content

avh13

New Members
  • Posts

    2
  • Joined

  • Last visited

avh13's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you for your response! Yes those are the values the user will put in
  2. Hi, I am new to php and I am having trouble with a php login code for website I am making. I am getting a response saying "notice undefined variable row" this is what I have thus far: How would I define that row? <?php $db_usr= $_POST["userid"]; $db_pswd= $_POST["password"]; $con=mysql_connect("localhost",$db_user,$db_pass, $db_name); if(! $con) { die('Connection Failed'.mysql_error()); } mysql_select_db("*****",$con); $sql=mysql_query("SELECT * FROM users WHERE userid='name' and password='password'"); $result=mysql_query($sql); { if($row["userid"]==$db_usr && $row["password"]==$db_pswd) echo "Welcome Back $db_usr "; else echo "Sorry $db_usr"; } ?>
×
×
  • 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.