Gossamer Forum
Home : General : Perl Programming :

PHP error

Quote Reply
PHP error
when i use this script on my site i get this message when i try to sign in

Parse error: parse error in /usr/home/v1/a0008638/html/myorgbook/security.php3 on line 5

here is a copy of what i have

<?

#edit $cookdomain variable to reflect your domain

$cookdomain = femnetwork.net";



##################################################

if (!isset($uemail)) {

include('index.php3');

exit;

}

elseif (isset($password)) {



include('inc/database.php3');

$query = "SELECT * FROM users WHERE uemail = '$uemail' and password = '$password'";

$result = mysql_db_query("a0008638", $query);

$num = mysql_numrows($result);

if ($num != "0"){

srand((double)microtime()*1000000);

$cookid = rand();

$cookie_pass = "$uemail:$cookid";

include('inc/database.php3');

$query = "UPDATE users SET cookid ='$cookid' WHERE uemail ='$uemail'";

$result = mysql_db_query("a0008638", $query);

setcookie("cookid",$cookie_pass,time()+14400,"/","$cookdomain",0);

}

else {

include('index.php3');

exit;

}

}

include('successful.php3');

exit;

}

?>

I would very much like to use this application. plz help me fix my erorr.

Thanks


Quote Reply
Re: PHP error In reply to
i am no php expert .. actually i know nothing about php.. but.... this looks like a basic syntax error with any language..

Line 5 is this..
$cookdomain = femnetwork.net";

Dont you think you need another " there ? like so
$cookdomain = "femnetwork.net";

hope this helps
drew





Quote Reply
Re: PHP error In reply to
thanks for that helpful hint, however there still is something not right now i get another error message on line 38, could someone plz read my complete script for me? i've been working on this for hours and can't make any sense of it anymore. :(