PHP in content
I am attempting to include PHP in the content area of a site in Cascade, and the <!--#START-CODE #END-CODE--> tags work normally for php, but I am running into an exception with code such as below. How would you recommend for this to be inserted onto a site in the html content region. (this is just part of the code, but is the area that is giving me issues)
<input id="LN" name="LN" value="<?=getFormData("search_LN")?>" type="hidden" />
Thank you,
Michele
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Eric L. Epps on 11 Jun, 2012 01:03 PM
I usually use PHP to echo the whole tag, Cascade tends to not like the < > symbols in an attribute. Something like:
Support Staff 3 Posted by Ryan Griffith on 11 Jun, 2012 09:18 PM
Michele,
As Eric mentioned, inserting the <!--#START-CODE #END-CODE--> comments within the value attribute of the input tag would cause the comment (and PHP code) to become the actual value of the input.
With either method of echo'ing, try surrounding the entire input (or PHP code) with the comments.
Support Staff 4 Posted by Ryan Griffith on 18 Jun, 2012 05:20 PM
Hi Michele, Just wanted to follow up to see if you were able to get your PHP to work as expected.
Thanks.
5 Posted by webteam on 18 Jun, 2012 05:40 PM
Yes, I did - thank you for following up with me on this! It is greatly appreciated.
Support Staff 6 Posted by Ryan Griffith on 18 Jun, 2012 05:41 PM
Great, I am glad to see you got this working. I am going to go ahead and close this discussion.
If you encounter any issues relating to this, feel free to reply to re-open the discussion.
Thanks.
Ryan Griffith closed this discussion on 18 Jun, 2012 05:41 PM.