Image

Imagesuhl wrote in Imagephp_dev

Parse error

Today I decided site skins would be a fun way of displaying different sides of my design talent. I remembered seeing the tutorial for PHP skinning on domesticat.net, so I thought I'd give it a try. But I keep getting a parse error, unexpected { on the first line of the cookiecheck.php file. I thought maybe somebody here could either explain why (I sure haven't figured it out) or point me to a better way of skinning.

Thanks! And here's the cookiecheck.php lines:

if (isset($newskin))
{
     $newskin=(int)$newskin;
    if ($newskin<1) $newskin=1;
    if ($newskin>2) $newskin=1;
  }
elseif (isset($skin))
{
    $newskin=(int)$skin;
    if ($skin<1) $newskin=1;
    if ($skin>2) $newskin=1;
  }
else {
    $newskin=1;
  }
  $skin=$newskin;
  setcookie ('skin', "", time() - 3600);
  setcookie('skin',$newskin,time()+(86400*365),'/');
  setcookie('skin',$newskin,time()+(86400*365),'/','.graphospasm.net');
  $skin=$newskin;