Parse error @ header template when adding my own php-code!
-
Hello!
Im currently running wp 1.5 and the classic theme. Now, in the header i wanna insert the following script;<?php
Â
if(!isset($_COOKIE[“din_kana”])) {
 echo ‘<img src=”images/new.jpg”>’;
 setcookie(“din_kana”, TRUE, time()+3600);
} else {
 echo ‘<img src=”images/visited.jpg”>’;
}
Â
?>As you may understand, i want to show the users one image first time they enter, and then show’em another later. But all i get is:
Parse error: parse error, unexpected T_IF in /customers/gosse.se/gosse.se/httpd.www/artikel/wp-content/themes/classic/header.php on line 29
Can anybody help out please?
Thanks
mårten, sweden
The topic ‘Parse error @ header template when adding my own php-code!’ is closed to new replies.