fubarur Posted December 11, 2007 Share Posted December 11, 2007 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 Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 <?php $type = $_GET['type']; if ($type == "manual") { include("manual.php"); } else { echo "Some Other Content Here"; } ?> Quote Link to comment Share on other sites More sharing options...
JacobYaYa Posted December 11, 2007 Share Posted December 11, 2007 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 Quote Link to comment Share on other sites More sharing options...
fubarur Posted December 11, 2007 Author Share Posted December 11, 2007 Thanks that seems to be working! good thing sites like this exist! 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.