A user will type in thier name, and click a "submit" button and have it stored somewhere, up to 24 people will do this. I would like it so only 24 names can be submitted, and if another name is submitted have some type of message to appear saying "theres too many names" or something to that effect. After I want the script to take the 24 names and randomize them into 8 different groups of 3. Any help would be greatly appreciated.
Team Creator Help o.O
Moderator: General Moderators
Team Creator Help o.O
I am trying to create a team creator in PHP...
A user will type in thier name, and click a "submit" button and have it stored somewhere, up to 24 people will do this. I would like it so only 24 names can be submitted, and if another name is submitted have some type of message to appear saying "theres too many names" or something to that effect. After I want the script to take the 24 names and randomize them into 8 different groups of 3. Any help would be greatly appreciated.

A user will type in thier name, and click a "submit" button and have it stored somewhere, up to 24 people will do this. I would like it so only 24 names can be submitted, and if another name is submitted have some type of message to appear saying "theres too many names" or something to that effect. After I want the script to take the 24 names and randomize them into 8 different groups of 3. Any help would be greatly appreciated.
Not too hard, if you are using a MySQL database. To solve the problem with a max of 24 users I would use an unique/auto_increment ID for each of the names. That way if the ID is > 24 then you output the error message. For the random part I would look into the rand() function. Make your own little function that will go through and pick 3 random numbers each time but make sure to remember which ones are already being used. Post if you need more help.