Davka Posted November 24, 2006 Share Posted November 24, 2006 OK, I'm pretty new to this stuff, but I learn fast.Here's my question: I've got a php page called "container.php." I've got html content in one part of my container called "$page." I have no problem including the $page content like so:<?php @ require_once ("resources/$page.html"); ?>And linking to it like so:A HREF="container.php?page=FOO"This brings up my container with FOO.html in the correct spot. So far, so good. But what I also want to do is have a navigation bar at the side, similarly called by a variable rather than a static name. Right now I've got this:<?php @ require_once ("phpincludes/page_navbar.php"); ?>..which works fine, but what I WANT to do is replace that with<?php @ require_once ("phpincludes/$links.php"); ?>. . . and this is where I get lost. How do I link to a page with multiple variables? I triedA HREF="container.php?page=FOO&&links=FOO_NAVBAR" ...which obviously didn't work, along with a number of other blind guesses. I can't seem to find the proper syntax for this fairly simple call anywheres. Um - help? Quote Link to comment Share on other sites More sharing options...
fert Posted November 24, 2006 Share Posted November 24, 2006 page.php?foo=blah&bar=whatever Quote Link to comment Share on other sites More sharing options...
marcus Posted November 24, 2006 Share Posted November 24, 2006 Make $links = $_GET[links] Quote Link to comment Share on other sites More sharing options...
Davka Posted November 24, 2006 Author Share Posted November 24, 2006 Many thanks.Turned out I'd already tried the right syntax, but with all the tweaking I've been doing to this site I messed up my link to one of the php scripts I was requiring.Once I knew the syntax of my link was correct, it made finding the real problem much easier. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.