Hi, I'm pretty new to php but I've been working on a site and have a
problem I can't fix, though it's probably pretty simple.
Basically I have an index.php file that includes a header.php file. I
attempt to pass a variable to it as follows:
<?include("head er.php?page=Hom e");?>
Then the header.php file contains this code:
<?php
$page = $_GET['page'];
?>
<html><head><ti tle><?$page?></title>
I want $page to contain the string "Home" of course, but it ends up
being nothing but an empty string.
Thanks in advance for your help.
Matt
problem I can't fix, though it's probably pretty simple.
Basically I have an index.php file that includes a header.php file. I
attempt to pass a variable to it as follows:
<?include("head er.php?page=Hom e");?>
Then the header.php file contains this code:
<?php
$page = $_GET['page'];
?>
<html><head><ti tle><?$page?></title>
I want $page to contain the string "Home" of course, but it ends up
being nothing but an empty string.
Thanks in advance for your help.
Matt
Comment