Jump to content

Multiple Variables in URL??


Davka

Recommended Posts

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 tried

A 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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.