I'm hacking into my vBulletin forum to use individuals current usernames, passwords, and membergroups to setup a premium portion of my site.
I have the following query:
$users = mysql_query("SELECT * FROM user WHERE username='$username' AND membergroupids='32'");
With this query my login works for those who have signed up for the premium content on the forum. One problem is if the members join multiple user created member groups, they're membergroupids will be like 32,10,34. I need my query to find if they belong to 32 and if so allow them access.
So, if they belong to 32,10,34 then they should be allowed to enter, but if they belong to 10,34 they should not.