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

Reply via email to