Jump to content

check for multiple entries


simpli

Recommended Posts

Hi,

I have a form with let's say 10 input fields

Player1='Wayne Gretzky'

player2='Mario Lemieux'

player3='Wayne Gretzky'

and so on until 10. I do NOT want users to choose the same player twice. How could I verify if this rule is respected in php? Is there a ready-made function with arrays which I can count the number of occurence of each single players? Or do i have to go recursively and check that each player hasn't been inserted before? I wouldn't want to do it recursively as I know it would not be efficient.

 

Any input is welcome. Thank you,

J-R

 

Link to comment
https://forums.phpfreaks.com/topic/150538-check-for-multiple-entries/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.