Me and a friend are working on a login script with cookies without cookies the code work fine.
this is the error:
Parse error: parse error in /data/members/free/tripod/uk/g/r/i/grimproductionteam/htdocs/login.php on line 10
this is my script:
<?php
include ("authentication.inc");
$link=mysql_connect("$host","$user","$password")or die("Could not log in because of mysql_error()");
mysql_select_db("$database",$link)or die("Could not select the database because of mysql_error()");
$query=mysql_query("SELECT * FROM users WHERE username=\"$username\"")or die(mysql_error());
while($row=mysql_fetch_row($query)){
$pass=$row['password'];
if($pass=$password){
<FONT COLOR=BLUE>Logged in!
setcookie("grimname","$username",time()+3000);
setcookie("grimpass","$pass",time()+3000);
}
else{
echo "<FONT COLOR=BLUE>Login failed";
}
}
?>
this is line 10:
while($row=mysql_fetch_row($query)){