[PHP] Tag Generated Categories / Pages

Breezer

Mr Mañana
Legendary
Jul 16, 2004
3,370
539
315
I need help on this one, i got a script that lets people upload posts and tag them. I want my script to be able to calculate the amount of tags inputted, so if a duplicate tag comes up in another post it will be categorized alongside it.

Now i know alot of quick install blogs / scripts do this already but i need this in my script i got off a mate. What i need is for categories to be automatically generated when a tag is used over 10 times, pulling all corresponding posts together into one category (i also need a link to be created aswell).

My tags are being stored in SQL under the posts table, and i have created a categories table ready for when they're being generated. So for the hard part, counting tags and generating pages.

Anyone got a clue how i can do this, i know the steps just not the coding.

1. Create TAGS database and update submit.php to update that table aswell as increment tag count
2. Check the TAG count upon submission to then determine if its reach the value (10 in this case)
3. CREATE category in categories table based on TAG name
4. add category menu and update view.php to show category choice.

so yeh , thats how id assume its done lol.