I need a simple category structure, based on two database tables.
First table is the categories, second table is the items them self.
Your job is to make a PHP / HTML page with a menu for categories on the left hand side, and the listing on the right. (See attached image)
When selecting a category item on the left hand menu, the page reloads with a PHP GET variable. (ie: [url removed, login to view]). Thus revealing the corresponding items from the items table, with category_id tagged as 4.
It must be possible to implement/include this code on an already existing webpage, through <? php include(''); ...
See attached image for details on the look of the HTML page.
It's not nessecary to use a lot of time on the LOOKS of the HTML page, since I will redesign most of it. Just make it plain and simple.
Please let me know if you have any questions.
1. The menu on the left should be designed as TREEVIEW. It should expand and contract when clicking on it.
The structure should be inside a <ul></ul> and each category in a seperate <li> </li>
If you want, you can use jQuery.
2. Search functionality support. Important.
I also need a function or script that releals what category an item belongs to.
For example. If I query this function/script with a file with ID 5593, it will tell me that this file is a part of "Category 4 - Sub Category 1 - SubSubcategory 4" (if it is)
It can f.ex be queried like this: findcategory.php?fileID=5593
And report back this way:
Successfull = File 5593 is in "<a href="index?category=1">Category 4</a> - <a href="index?category=2">Sub Category 1</a> - <a href="index?category=3">SubSubcategory 4</a>"
These are links reported. User can click on link, and be sent to the index.php page with correct category set. Thus revealing all items in that category.