Posted by seaside on 12/23/06 13:07
Paul E Collins schrieb:
> I want to skip the rendering of certain parts of a Web page if the
> user doesn't have a certain permission (e.g. a cookie). I'd like to do
> it along these lines:
>
> <p>Anybody can see this paragraph.</p>
> <? start_protected_section($got_permission); ?>
> <p>Not everybody can see this paragraph.</p>
> <? end_protected_section(); ?>
Go and download a template engine like Smarty
http://smarty.php.net/
and separate your code from your layout. I use it for quite some time
and maintainability of code is much better.
Navigation:
[Reply to this message]
|