Forum Moderators: coopster

Message Too Old, No Replies

sending variables to php includes

can it be done?

         

benihana

7:42 pm on Mar 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i want to use a common header across all my pages - basically including everything from <html> to <body>, but would like to be able to give each a unique <title>

i tried :
<?php include("assets/includes/header.php?title=my+page+title");?>

and in header.php:

<title="<? echo($title);?>

but it failed with a Failed opening error-

is this possible,?

cheers

ben

Timotheos

8:26 pm on Mar 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you'd want to do it like this...

<?php
$title = "My Title";
include("assets/includes/header.php");
?>

benihana

10:04 pm on Mar 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



excellent. thanks very much :)