Page 1 of 1
PHP code not working
Posted: Sun Oct 01, 2006 6:46 pm
by stinhambo
I have a form that I use in my static XHTML pages which works great. Here is an exerpt from the code -
#footercontent" enctype="multipart/form-data">
Company:
" />
I have tried to create a custom tag and global content blocks but even if I strip the <?php from the code it still doesn't work properly. I'm going mad as I'm 95% of the way to getting the site finished!!
Can someone help me out?
Re: PHP code not working
Posted: Mon Oct 02, 2006 10:08 am
by cyberman
Have you tried something like this?
Company:
You have to allow smarty plugins in config.php ...
Re: PHP code not working
Posted: Mon Oct 02, 2006 10:43 am
by stinhambo
I'll give that a go!
I was coding at about 4am so I probably run out of steam and decided to post here.
I'll show off the site when I'm done

Re: PHP code not working
Posted: Tue Oct 03, 2006 2:50 am
by stinhambo
I have enabled smarty tags but the bloody editor keeps cutting down my code.
I start with this -
" enctype="multipart/form-data">
So I convert it to this -
I then get error messages such as 'Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/hambo/public_html/185theterrace/tmp/templates_c/%%89^89F^89F8ECB5%%globalcontent%3Acontactform.php on line 6' on the HTML page and when I go back to the CMS I get this -
For the full page I want to convert -
">
#footercontent" enctype="multipart/form-data">
Company:
" />
Name:
" />
Phone Number:
" />
Email:
" />
Message:
">
Thank you!
Your message has been sent!
PS. I am putting the above in a Global Conent Block and the PHP for the form in a User Defined Tag.
Re: PHP code not working
Posted: Tue Oct 03, 2006 2:51 am
by calguy1000
turn off the editor and try again.
wysiwygs are a curse

Re: PHP code not working
Posted: Tue Oct 03, 2006 3:28 am
by stinhambo
aha thats better but just a couple of problems...
1. No email is sent
2. My class variables aren't working - . It used to have '<?php=' but if I put '{php}=' it comes up with an error (unexpected =)
3. When I submit the email it jumps to the front page...
PS. I love this CMS though!
Re: PHP code not working
Posted: Tue Oct 03, 2006 3:56 am
by calguy1000
try {php}echo $variable;{/php}
Re: PHP code not working
Posted: Tue Oct 03, 2006 4:36 am
by stinhambo
tried that and it didn't work

Re: PHP code not working
Posted: Tue Oct 03, 2006 5:02 am
by stinhambo
I'm trying out the feedback form now...