Hi all! I am a webmaster of a healthsite and I PHP:ed it recently. So far I've built a guestbook and i also use require for includning everything but the text on each page (standard code in separate documents, design/navigating elements that are not static in other documents). I've found this being a good system since it helps me in updating and evolving my site.
I have just a little problem though.
From each page I would like to link to a "printer friendly version", since my layout design wastes a lot of paper for the readers.
I have three different solutions for the problem and need help with number 2 and 3:
(bad) Make a copy of each page and name it file.html instead of file.php. This will stop the include and render a nice page. it will, though, demand a LOT of work. both in management and coding all of my pages (50+).
(better) When the page executes I already have comments in my text for my elements (i.e. <!--text area--> <!--/test area> and so on). In this case I can use htmlreferer to choose what to include in my printit.php file. All I need is some way to filter it (regular expressions). I have NO idea of how this works. If you have a direct link to a resource or if you could write me a suggestion of such code, I would be delighted.
(best imo) If there is any way to exclude the php tags in my original document when it is required/included in the prinit.php document, that would be marvelous. I need the whole syntax of a tag like that.
I find PHP incredibly fascinating and is eager to learn more. Please help.
Best regards
Olof Ohlsson