raman Posted December 14, 2008 Share Posted December 14, 2008 I have a site on which I want to add a help page for each of the other pages and specific to a particular section on that page.However I want that I write only a single master documentation page and then when help for a specific section on a page is asked for then that is written to a html page .Can someone tell a script for this ? Say this is my documentation page with different topics : 1.Introduction Bla bala bla bla bfnffygyfjxsgdggjhgjhgj 2.Search Bladffdhgfhfhgf dfdhfghgdfhgf dffggfhdfhd 3.Download lhjhjhgsdhhfhgf Also suppose that introduction and search are for help on a single html page and Download is on another webpage on the website. Link to comment https://forums.phpfreaks.com/topic/136926-help-page-script/ Share on other sites More sharing options...
Mad Mick Posted December 14, 2008 Share Posted December 14, 2008 You can write a single help.php page that interrogates the $_HTTP_REFERER variable. You can use a switch statement to provide different help for whatever page that help.php was reached by. Link to comment https://forums.phpfreaks.com/topic/136926-help-page-script/#findComment-715159 Share on other sites More sharing options...
raman Posted December 14, 2008 Author Share Posted December 14, 2008 Can you explain by writing the script ? Link to comment https://forums.phpfreaks.com/topic/136926-help-page-script/#findComment-715169 Share on other sites More sharing options...
Mad Mick Posted December 14, 2008 Share Posted December 14, 2008 Actually forget HTTP_REFERER - it is not widely supported. Instead you can use GET variables. So each help link on the main pages would be help.php?help=n where n is the help topic. Then your help.php could be: $help_choice=$_GET['help']; switch ($help_choice){ case 1: echo "first help info"; break; case 2: echo "second help info"; break; .....etc.. default: echo "no help choice" ... and whatever error stuff you want } Link to comment https://forums.phpfreaks.com/topic/136926-help-page-script/#findComment-715178 Share on other sites More sharing options...
raman Posted December 15, 2008 Author Share Posted December 15, 2008 I think it would work,I shall try. Link to comment https://forums.phpfreaks.com/topic/136926-help-page-script/#findComment-715577 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.