On Mon, 2012-08-27 at 15:56 -0400, Jim Giner wrote:

> On 8/27/2012 3:17 PM, Jack S wrote:
> > Hello All,
> >
> > Trying to figure out why when I include the page that contains this
> > code, I'm not able to get the $calling_page populated with any values.
> > Any help appreciated...
> >
> >
> > <?
> > # Dynamic Content based in page
> > $calling_page = $_GET['page'];
> >
> > # Home Page 
> > ------------------------------------------------------------------------------------------------------------------------------
> > if(!($calling_page)) {
> >          $title = "Title 1 - $calling_page";
> >             $body = "<body />";
> >
> > } elseif ($calling_page == "index") {
> >          $title = "Title 2 - $calling_page";
> >             $body = "<body />";
> >
> > # Non Specified Page
> > --------------------------------------------------------------------------------------------------------------
> > } else {
> >          $title = "Title 3 - $calling_page";
> >             $body = "<body />";
> >
> > }
> >
> > echo "<title>".$title."</title>";
> > ?>
> >
> >
> Since this code does nothing other than assign a value to $calling_page 
> based upon the content of a GET variable, what do you mean by "not able 
> to get the $calling_page populated with any values.".
> 
> Are you simply saying that "$calling_page does not have a value assigned 
> to it"?  And if that is what you meant to say, then the answer is that 
> your GET array does not contain an index of 'page'.  Of course, even if 
> that were true, you would in fact have a value in $calling_page and it 
> would be simply: "Title 1 - ".
> 
> 


How are you including this in your code? GET data won't be passed in a
call like require("some_file.php?page=page");
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk


Reply via email to