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
https://forums.phpfreaks.com/topic/28365-multiple-variables-in-url/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.