Posted by Paul E Collins on 12/23/06 09:20
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(); ?>
Is it possible to disable the rendering of a section outside the code
like this (perhaps by setting a PHP flag to redirect subsequent
output)? I don't really want to complicate things by moving part of
the page into a separate "include file" or mixing the HTML and PHP by
using a here-document (the <<<END syntax).
Eq.
Navigation:
[Reply to this message]
|