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
https://forums.phpfreaks.com/topic/81259-solved-include-pages-noob-help-needed/
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

 

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.