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?
PHP code not working
-
cyberman
Re: PHP code not working
Have you tried something like this?
You have to allow smarty plugins in config.php ...
Company:
-
stinhambo
Re: PHP code not working
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
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
-
stinhambo
Re: PHP code not working
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.
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.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: PHP code not working
turn off the editor and try again.
wysiwygs are a curse
wysiwygs are a curse
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.
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.
-
stinhambo
Re: PHP code not working
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!
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!
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: PHP code not working
try {php}echo $variable;{/php}
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.
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.
