Hello,
I have a log in box using mysql and when you click login it goes in if you dont put anything in any of the feilds this is the code i`m using,
<?
$conn = mysql_connect("localhost","username","password");
$db = mysql_select_db("racing_login");
$result = MYSQL_QUERY("SELECT username, password from users WHERE username='$username'and password='$password'") or die ("username and password not found or not matched");
$worked = mysql_fetch_array($result);
$user = $worked[username];
$password = $worked[password];
if($worked)
echo "welcome $user";
?>
What do i need to add or fix?
Thanks in advance,
Eric