> the problem is, if I terminate the script on that condition the footer
> won't be displayed...

Instant fix - include "footer.inc"; exit;

Better fix: decide your logical layout before you proceed and arrange if/else
blocks accordingly so you don't need to terminate the script to avoid showing a
page's contents.

ie: have your single template shell which includes a particular content
container if your code allows. here's one way

<?
/*
protect yourself from people doing things like
http://your.domain/your/script?include=../../../../../../../../some/secret/file
*/
unset($include); // will do for the purpose of this example

if ($something)
    $include = "this_particular_content.inc";
else if ($something_else)
    $include = "this_other_content.inc";

include "your_header.inc";

include $include;

include "footer.inc";
?>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to