ItsWesYo Posted August 21, 2006 Share Posted August 21, 2006 Alright. I'm going to make a FAQ section on my own.When you click on 'FAQ' on the navigation menu, it will go to 'faq.php'.When you're at 'faq.php', there will be different faq sections. Such as 'general', 'account', 'other', etc.Right now, when you click on one .. it has an id ...example: if i click on 'general', it goes to 'faq.php?id=1'.What I want now is ... in that page ... i want people to see a list of the questions...when they click on a question, i want the url to be 'faq.php?id=1&q=1' and so on.How would I do that? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 21, 2006 Share Posted August 21, 2006 use the parameters set in the url to query the database for the relevant info....you have already done so for 'id' do the same for 'p'. You will need to use if statements based on which parameters are set and adjust the queries accordingly. Quote Link to comment Share on other sites More sharing options...
ItsWesYo Posted August 21, 2006 Author Share Posted August 21, 2006 Well, it's not in the database ..... here is my current [b]faq.php[/b] page:[code]<?phpinclude ("http://wes.hypreed.com/header.php");$page = $_REQUEST['id'];if($page == "1"){echo ( "question 1<br>answer 1<br><br>question 2<br>answer 2" );die();}elseif($page == "2"){echo ( "question<br>answer<br><br>question<br>answer" );die();}else {echo ( "<a href='?id=1'>Account</a><br><a href='?id=2'>General</a>");die();}?>[/code] 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.