...site? seems to be no problem with connection to database hoping someone can see a mistake or were i neeed to add some code or change the code
?php
$username = $_POST['username'];
$password = $_POST['password'];
if ($username&&$password)
{
$connect = mysql_connect("localhost", "20203800", "ralph") or die("please enter a username and password");
mysql_select_db("two0203800") or die (mysql_error());
$query = mysql_query ("SELECT * from lastchancesaloon WHERE uname ='$username'");
$numrows = mysql_num_rows ($query);
if ($numrows!=0)
{
while ($row = mysql_fetch_assoc($query))
{
$dbusername = $row ['uname'];
$dbpassword = $row ['pwd'];
}
// check to see if match
if ($username==$dbusername&&$password==$dbpassword)
{
echo "you are in there ";
}
else
echo "incorrect password";
}
else
die("that user does not excist");
}
else
die("please enter a username and password");
?>
?php
$username = $_POST['username'];
$password = $_POST['password'];
if ($username&&$password)
{
$connect = mysql_connect("localhost", "20203800", "ralph") or die("please enter a username and password");
mysql_select_db("two0203800") or die (mysql_error());
$query = mysql_query ("SELECT * from lastchancesaloon WHERE uname ='$username'");
$numrows = mysql_num_rows ($query);
if ($numrows!=0)
{
while ($row = mysql_fetch_assoc($query))
{
$dbusername = $row ['uname'];
$dbpassword = $row ['pwd'];
}
// check to see if match
if ($username==$dbusername&&$password==$dbpassword)
{
echo "you are in there ";
}
else
echo "incorrect password";
}
else
die("that user does not excist");
}
else
die("please enter a username and password");
?>