Don’t be sorry, coding is hard to get right sometimes. Thanks for the database layout, it helps…
SO, you have the faq_cat displayed in a 3x3 grid. Each one of those will have a HREF pointing back to this same page. In each of the HREF’s would be the ?faq_name=$name or whatever you want to indicate the name of the faq. For this part, when a user selects a new FAQ to view by pressing on one of the 9 links, they would be sent back to the same page, but, the variable “faq_name” would be passed, too.
Then, down your code a bit where you are ready to display the questions asked for a FAQ, you use the “faq_name” that is sent. You used “catid” in your samples. For the questions to be selected, you would use the FAQ name. So you retrieve it with $currentfaq=$_GET[[‘faq_name’]; Of course this “faq_name” is what I am calling it. It would be whatever you used in each of the HREF’s for the 9 FAQ selections.
Then, you query would be like this: (Almost the same as you had it!)
$query = mysql_query(“SELECT Q FROM faq where cat_id=$currentfaq”);
This query will pull all Q’s from the database where they match the current FAQ that was selected by the user. Just remember if the $currentfaq was not selected, such as the first time you come to the page, then you have to tell your code to use the first FAQ…
On another note… You did not explain much about what is inside these FAQ’s. If there are not very many, you can just post them in the lower section. If there are hundred’s, most likely you will have to create a paging system to allow only so many to be shown at one time. Just something to think about…