am i complete wrong here login prob
Posted: Sun Jan 18, 2004 3:06 pm
I ahve a form which the user enters username and password and pesses submit.
my php page then looks to see if there is a user with that username and password. it doesn't matter what password i use it lets me in each time.
Any ideas why this is.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$linkID = @mysql_connect("localhost", "root", "");
mysql_select_db("Customer", $linkID);
$resultID = mysql_query("SELECT * FROM tblLogon where UserName like '$username' AND Password like '$password'", $linkID);
if ($resultID == True)
{
print "$username, $password";
}
else
{
print "Your login failed sorry.<p>";
}
mysql_close($linkID);
?>
</body>
</html>
any help appreciated
my php page then looks to see if there is a user with that username and password. it doesn't matter what password i use it lets me in each time.
Any ideas why this is.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$linkID = @mysql_connect("localhost", "root", "");
mysql_select_db("Customer", $linkID);
$resultID = mysql_query("SELECT * FROM tblLogon where UserName like '$username' AND Password like '$password'", $linkID);
if ($resultID == True)
{
print "$username, $password";
}
else
{
print "Your login failed sorry.<p>";
}
mysql_close($linkID);
?>
</body>
</html>
any help appreciated