ztealmax Posted February 25, 2007 Share Posted February 25, 2007 Hi how can i add stuff after this <?=$_SERVER['PHP_SELF']?>?content=catalog"> ? What that does it opens the php document called catalog.php in predefined area "content" however i would like to have some more stuff after catalog.php like below: catalog.php?brand=<?=$brand?>&model=<?=$model?> ANy idea, or you need more info about what im talking about? //Cheers Link to comment https://forums.phpfreaks.com/topic/40017-how-can-i-add-stuff-after-this-contentcatalog/ Share on other sites More sharing options...
magic2goodil Posted February 25, 2007 Share Posted February 25, 2007 <?php $brand = "bah"; $model = "2"; $link=$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."&brand=".$brand."&model=".$model; echo $link; ?> Link to comment https://forums.phpfreaks.com/topic/40017-how-can-i-add-stuff-after-this-contentcatalog/#findComment-193540 Share on other sites More sharing options...
ztealmax Posted February 25, 2007 Author Share Posted February 25, 2007 ok but does it opens catalog.php in the area Content? or can you explain exactly what your code is doing /cheers this is in my index.php <?php if(isset($_GET['content'])){ include($_GET['content'].".php"); } else { echo " "; } ?> this is the code i want to show up in area "content" catalog.php?brand=<?=$brand?>&model=<?=$model?> this is code i useally use to open a document in area "content" <?=$_SERVER['PHP_SELF']?>?content=catalog"> Link to comment https://forums.phpfreaks.com/topic/40017-how-can-i-add-stuff-after-this-contentcatalog/#findComment-193546 Share on other sites More sharing options...
Hooker Posted February 25, 2007 Share Posted February 25, 2007 use a switch statement in your content area like so: <?php $content = $_GET['content']; switch ($content){ case "catalog": include("catalog.php"); break; case "page2": include("page2.php"); break; case "page3": include("page3.php"); break; default: include("catalog.php"); } ?> Link to comment https://forums.phpfreaks.com/topic/40017-how-can-i-add-stuff-after-this-contentcatalog/#findComment-193552 Share on other sites More sharing options...
ztealmax Posted February 25, 2007 Author Share Posted February 25, 2007 Ok i dont think you guys understand what im talking about allready have the content thing working it opens catalog.php in the content area...however what i need it to do is add ?brand=<?=$brand?>&model=<?=$model?> behind the link content.php if you see my previus posts you know what im talking about i hope it would be something like this content.php?brand=<?=$brand?>&model=<?=$model?> think you guys can figure out what im talking about ok is it possible to add it like this or something? <?=$_SERVER['PHP_SELF']?>?content=catalog"+?brand=<?=$brand?>&model=<?=$model?> > ?? Link to comment https://forums.phpfreaks.com/topic/40017-how-can-i-add-stuff-after-this-contentcatalog/#findComment-193555 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.