dgnzcn Posted June 25, 2013 Share Posted June 25, 2013 hello, my web page links structures like this: index.php?page=contents&pagegroup=products&productid=someproduct and index.php?page=contents&pagegroup=news&productid=somenews my issue: i just wanna include images.php file when using pagegroup=products. But i am not need include images.php file without using pagegroup=products. Link to comment https://forums.phpfreaks.com/topic/279549-php-include/ Share on other sites More sharing options...
trq Posted June 25, 2013 Share Posted June 25, 2013 This isn't exactly a difficult task, what have you actually tried? Link to comment https://forums.phpfreaks.com/topic/279549-php-include/#findComment-1437766 Share on other sites More sharing options...
dgnzcn Posted June 25, 2013 Author Share Posted June 25, 2013 Not try but i am included images.php file to content.php but when i opening news page images.php still showing there. i do not want this. just need show only in products. there is only one file for all contents contents.php how can i do it? Link to comment https://forums.phpfreaks.com/topic/279549-php-include/#findComment-1437775 Share on other sites More sharing options...
Irate Posted June 25, 2013 Share Posted June 25, 2013 Hint hint: You can test for $_GET['pageproducts']. Link to comment https://forums.phpfreaks.com/topic/279549-php-include/#findComment-1437776 Share on other sites More sharing options...
dgnzcn Posted June 25, 2013 Author Share Posted June 25, 2013 ok, thanks for the answers. i do following it is working for me. if($_GET['pagegroup] == "products"){include("images.php");} if($_GET['pagegroup] == "news"){ include("subnews.php");} Link to comment https://forums.phpfreaks.com/topic/279549-php-include/#findComment-1437813 Share on other sites More sharing options...
Irate Posted June 25, 2013 Share Posted June 25, 2013 Good, glad you figured it out. Oh, another hint, use code tags on this forum when posting code. [code][/code] or [ic][/ic] Link to comment https://forums.phpfreaks.com/topic/279549-php-include/#findComment-1437828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.