close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How do I pass a URL variable to a results page?

Thread began 4/18/2014 9:51 am by mora398588 | Last modified 4/18/2014 11:07 am by Jason Byrnes | 309 views | 1 replies |

mora398588

How do I pass a URL variable to a results page?

I am attempting to create frequently asked questions php pages where an individual will start at a page (library.php) listing various categories; and from there, the individual can select a category and be redirected to another page (library_results.php) to view only those questions and answers under that category .

Based on prior experience, I understand that a variable will need to be created which can be passed from the library.php page to the library_results.php page (the variable I considering using is FaqCatID). I have already setup the appropriate MYSQL database and tables, including a table where I have listed the categories (faqcategory) and another table where the questions and answers are located (faquestions). In the faquestions table, I have included a category ID column (FaqCatID) where I am attempting to organize the questions and answers by the appropriate category.

Since I am working with two tables, I am lead to believe that a relationship may need to be created so the two tables see each other and can distinguish those questions and answers from the categories.

Here is what I have done so far:

1. I have created a URL Variable (FaqCatID) on the library.php page.
2. On the library.php page, I have inserted a recordset using the faqcategory table and filtered it by the tables FaqCatID - Session Variable FaqCatID.
3. On the library.php page, each category is setup up as a hyperlink to library_results.php page (i.e., <a href="library_faq.php?FaqCatID=1"> Meal Periods </a>)
4. On the library_results.php page, I have inserted a recordset using the faquestions table. I recordset is not filtered (I do not know what to do here).
5. On the library_results.php page, I have bound parts of the recordset to the page to show the questions and answers. There is also a repeat region to show up to 10 results.

Of course, I am not getting the desired results. So, I know that I am goofing up somewhere.

Where I need assistance is how to pass the appropriate variable from the library.php page to the library_results.php page so only those questions and answers show under the category the individual previously selected from the library.php page. I am also uncertain how to go about creating the appropriate recordsets for each page.

I have attached the pages to this post for your information.

Sign in to reply to this post

Jason ByrnesWebAssist

basically, what you are trying to create is what is called a Master / Details page set.

the library page is the Master page that shows all the FAQ categories, and the library_results.php page shows the details of the FAQs for the selected categories.

In the database starter kit tutorial:
http://www.webassist.com/community/tutorials/view_tutorial.php?tid=104

I give steps for creating a creating a very similar master detail page set for Categories and products that belong to the selected category. If you follow that tutorial, it should help you understand how the recordsets for your page should be created.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...