ok i got this code so far i thought it was right but i keep getting the error cant do it. but the line seems ok. all the tables and rows are correct im baffled.
$mode = $HTTP_GET_VARS[\'mode\'];
if ($mode == "login"){
$username = $HTTP_POST_VARS[\'username\'];
$password = $HTTP_POST_VARS[\'password\'];
$db=mysql_connect("localhost","","") or die ("cant connect");
mysql_select_db("News",$db) or die ("cant change");
$result=mysql_query("select * from users where name=\'$username\'",$db) or die ("cant do it");
while ($row=mysql_fetch_array($result)) {
if ($row["password"]==$password) {
print("Successfully Logged In!<a href="default.php?"\'>Click Here</a>");
exit;
}
}
}