Php Code In Template

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Sean

Php Code In Template

Post by Sean »

I'm simply trying to put some php code in my template and it's not working. This this is the code I'm trying to insert.

Code: Select all

<? 
setcookie ("overcookie", "cookie1");
?>
and this

Code: Select all

<?php

if ($_COOKIE["overcookie"]) {
}
else {
    echo "<div id=\"flashoverlay\" onclick=\"this.style.visibility='hidden'\"></div>";
}
?>
Any idea what i need to do to make this work?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Php Code In Template

Post by calguy1000 »

a simple search on the forum or the wiki would answer this, it's been asked and answered dozens of times already.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Sean

Re: Php Code In Template

Post by Sean »

I looked but the things I found didn't help, I found pages that told me to use {literal} tags or use cms made simple built php functions. Wha????
Sean

Re: Php Code In Template

Post by Sean »

o ok, found something, thank you!
Locked

Return to “CMSMS Core”