At 07:23 15.03.2003, Sebastian said:
--------------------[snip]--------------------
>doesn't work but also doesn't give any errors, I will try to explain what I
>am trying to do:
>
>I am trying to remove the header and footer to create a "printer friendly
>page" with just the content, here's what my pages look like, I need to
>remove header and footer when they visit: file.php?action=print
>
><?php
>include("../config.php");
>
>if($_GET[action] == "print")
>{
> $header = str_replace('include("$header");', '', $header);
> $footer = str_replace('include("$footer");', '', $footer);
>}
>
>include("$header");
>?>
>
>// html
>
><?php include("$footer"); ?>
--------------------[snip]--------------------
Hmm - can't work because the variable "$header" doesn't include the string
"include("$header");".
Try it this way:
<?php
include("../config.php");
if($_GET[action] == "print") {
$header = null;
$footer = null;
}
if ($header) include($header);
?>
// html
<?php if ($footer) include($footer); ?>
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php