This is my first post on this forum. I did a search, but I didn't find anyone else that had this problem. I have just learned PHP, and still know very little (what I know, I learned in 2 days). Using my small amount of knowledge of PHP, I wrote up a page that is supposed to set certain cookies under certain conditions, using if...else, and setcookie(). Here is what I came up with:
Code: Select all
<?php
if ($_REQUEST["item1"]=="yes")
setcookie(item1cookie, yes, date() + 3600;
if ($_REQUEST["item2"]=="yes")
setcookie(item2cookie, yes, date() + 3600);
if ($_REQUEST["item3"]=="yes")
setcookie(item3cookie, yes, date() + 3600);
if ($_REQUEST["item4"]=="yes)
setcookie(item4cookie, yes, date() + 3600);
?>Parse error: parse error, unexpected T_STRING in /home/content/g/e/i/geinternet/html/nucleussystems/PHP/testform.php on line 20
What I find really confusing, is that there isn't even a 20th line in the code