Implementation of I'm with stupid with PHP and MySQL