Hi all,
<?php
$con = mysql_connect('localhost','root','');
if (!$con)
{
die("Could not connect: " . mysql_error());
}
mysql_select_db('users',$con);
$sql="SELECT username FROM users_info";
$user = $_POST[username]
if($sql != $user)
{
die("Error: Username is not in our database! Make sure you check the spelling.");
}
else
{
redirect('/users/' ->$user);
}
mysql_close($con);
?>
The problem is when i type in a username on my form and it comes to this code, it says:
Parse error: syntax error, unexpected T_IF in ***/login.php on line 13
i know the user i typed in is correct.
Thanks for any help