You're missing a closing ')' on the if statement i.e.
if (!empty($name) && !empty($email) && !empty($submit) should be ... if (!empty($name) && !empty($email) && !empty($submit)) <- extra closing bracket HTH Rich -----Original Message----- From: Dennis Hoffmann [mailto:[EMAIL PROTECTED]] Sent: 25 August 2002 07:26 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Always getting a parse error Hi, I'm a newbie (you guessed, right?) :-) My problem is: I'm trying to set a cookie. There are 2 pages involved, the first of which containing a form: <form action=setcookie.php method=GET> <input type=text name=name>NAME<br> <input type=text name=email>Email<br> <input type=submit name=submit value=SEND> </form> . . . The 2nd file is setcookie.php, and so far I have the following code: if (!empty($name) && !empty($email) && !empty($submit) { $content = array("name"=>$name, "email"=>$email); setcookie("testcookie", $content, time()+3600); } else { echo "There was a mistake!"; } The error I receive is a "parsing error in line 7" which is exactly the else-command. Which mistake have I made, and how can I set that cookie? Greets, Mr. Hatch. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php