Writing PHP code in templates
Posted: Mon Aug 14, 2006 3:51 pm
hello everyone!
i'm certainly not a php guru, but i have a couple of sample php code snippets i've used successfully in an old site contact form, where it would display the form, and once you submit it, it would run through the same file again and decide whether it should display a thank you message or an "error: missing information.. please try again" message.
anyway, i'm trying to figure out how to write php within a template. if i simply write the code in, the page won't display at all. i can only guess that the php code contains some { and } characters, which seem to be used by the cms templating language. if i "neutralize" those { } characters by wrapping my php code with {literal} and {/literal} tags, everything actually displays, instead of working in the background like it's supposed.
is there a specific way that i need to write the php code so as to integrate properly?
thanks for any help!!
i'm certainly not a php guru, but i have a couple of sample php code snippets i've used successfully in an old site contact form, where it would display the form, and once you submit it, it would run through the same file again and decide whether it should display a thank you message or an "error: missing information.. please try again" message.
anyway, i'm trying to figure out how to write php within a template. if i simply write the code in, the page won't display at all. i can only guess that the php code contains some { and } characters, which seem to be used by the cms templating language. if i "neutralize" those { } characters by wrapping my php code with {literal} and {/literal} tags, everything actually displays, instead of working in the background like it's supposed.
is there a specific way that i need to write the php code so as to integrate properly?
thanks for any help!!