Implementing not automatic badges with PHP and MYSQL

Agingejefeada

New Member
I have users' table \[code\]users\[/code\], where I store information like \[code\]post_count\[/code\] and so on. I want to have ~50 badges and it is going to be even more than that in future. So, I want to have a page where member of website could go and take the badge, not automatically give him it like in SO. And after he clicks a button called smth like "Take 'Made 10 posts' badge" the system checks if he has posted 10 posts and doesn't have this badge already, and if it's ok, give him the badge and insert into the new table the badge's id and user_id that member couldn't take it twice. But I have so many badges, so do I really need to put so many if's to check for all badges? What would be your suggestion on this? How can I make it more optimal if it's even possible?Thank you.
 
Back
Top