$smodquery = "SELECT * FROM user WHERE usergroupid='5'"; $runsmodquery = mysql_query($smodquery); while ($smod=mysql_fetch_array($runsmodquery)) {