Jump to content

[SOLVED] Include pages Noob help needed


fubarur

Recommended Posts

Ok please be gentle  ???

 

I have searched all over and can not seem to find an answer, I think because I'm not sure what exactly would be the correct phrase to search under.

 

What I'm trying to do is

 

Example

www.XXXX.com/products/item.php (product example widgets)

(this page shows basic product info, with links to more detail info like a manual)

 

So if I linked to

www.XXXX.com/products/item.php?type=manual

it would then pull up a php page that has the manual on it...

 

The thing that confuses me is the whole ?type=manual

How do I se that up to call for the manual page in a "if" statement...

 

Hope someone can this noob. I hope I gave enough info to point me in the right direction

 

Thanks

Link to comment
Share on other sites

If a value is on the end of the url like "?type=manual" it is $_GET, in this case $_GET['type'].

 

You do this kind of thing

if(isset($_GET['type'])){//index.php?type=xxx
//Include or output your manual content
include_once '/docs/'.$_GET['type'].'php';
}else{
//Out default content (index.php)
}

You should do some checking that the type is valid etc

 

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.