Hide php code in html includes?
Posted: Sun Apr 23, 2006 3:34 pm
I'm creating a series of registration forms for an organization that does their own site maintenance. I've separated the html from the php as much as I can, but I do need some php in the html include to make the form "sticky" and color the labels of any missing fields. (I could put it in with DOM scripting, but if JavaScript is turned off...)
The problem is that the php code shows up in the visual editor they use for maintenance (FrontPage). Is there any way to hide it so that it doesn't appear. I've tried using asp-style tags and <script> tags, commenting it with html comments and putting it in as CDATA. Nothing seems to work. I don't want them erasing parts of my code that appear in "Normal" view (which is what you would see if you opened the include in IE).
Also, my code that works for "stickiness" in the <input>s doesn't work in the <textarea>. Any idea why?
Rick
The problem is that the php code shows up in the visual editor they use for maintenance (FrontPage). Is there any way to hide it so that it doesn't appear. I've tried using asp-style tags and <script> tags, commenting it with html comments and putting it in as CDATA. Nothing seems to work. I don't want them erasing parts of my code that appear in "Normal" view (which is what you would see if you opened the include in IE).
Also, my code that works for "stickiness" in the <input>s doesn't work in the <textarea>. Any idea why?
Code: Select all
<?php if (isset($_POST['howfound'])) echo $_POST['howfound']; ?>