-------------------DB-Structure------------------
| ID Name Parent Sort |
| 1 menu1 0 3 |
| 2 menu2 0 2 |
| 3 menu3-1 6 1 |
| 4 menu3-2 6 1 |
| 5 menu3-2-1 4 1 |
| 6 menu3 0 1 |
---------------------------------------------------
The generated html should look like this:
<ul>
<li><a href="?c=3">menu3</a</li>
<li><a href="?c=2">menu2</a></li>
<li><a href="?c=1">menu1</a></li>
</ul>
When user clicks menu1 it should look like this:
<ul>
<li><a href="?c=3" class="active">menu3</a>
<ul>
<li><a href="?c=3_3">menu3-1</a></li>
<li><a href="?c=3_4">menu3-2</a></li>
</ul>
</li>
<li><a href="?c=2">menu2</a></li>
<li><a href="?c=3">menu3</a></li>
</ul>
If user then clicks menu3-2 it should look like this:
<ul>
<li><a href="?c=3" class="active">menu3</a>
<ul>
<li><a href="?c=3_3">menu3-1</a></li>
<li><a href="?c=3_4" class="active">menu3-2</a>
<ul>
<li><a href="?c=3_4_5">menu3-2-1</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="?c=2">menu2</a></li>
<li><a href="?c=3">menu3</a></li>
</ul>
-------------------------------------------------------------------------
From the beginning only the menu-items with Parent-ID "0" will show up.
When clicking on an menu-item the page should reload and show the sub category, based on the query string.
Requirements:
No CSS.
No Javascript.
Get menu structure from mySQL into an array.
Generate the menu from the created array.
Please let me know if I wasn't clear enough.
Sir,
I am a highly skilled php developer and I can write the script for generating the menu items in proper order.
I can start coding now and can complete by next 24 hours.
Thanks
Rode
$30 USD in 1 day
5.0 (20 reviews)
5.4
5.4
5 freelancers are bidding on average $20 USD for this job