Random number, then remove from a list
Posted: Wed Jul 05, 2006 7:41 am
A bit of background.
I run a fishing website, normally when we have a Match at a lake, we pull our peg numbers from a bag and thats the peg you fish for the day.
However, people are arriving at seperate times, so we are trying to do this online.
So in english this is what im trying to achieve.
On a lake there are say 32 pegs, so my array is (1,2,3,4,5.etc to.32) I want the user to complete a form, and the script to randomly select one of the above numbers, data returned is say "David" "Peg 5".
I need David and his peg (5) to be logged into a MySQL database and the number 5 to disapear from my array.
Any help to kick me off would be most appriciated. Im not fantastic with PHP but I know a bit, I just cant seem to get started!
Thanks in advance
Si
I run a fishing website, normally when we have a Match at a lake, we pull our peg numbers from a bag and thats the peg you fish for the day.
However, people are arriving at seperate times, so we are trying to do this online.
So in english this is what im trying to achieve.
On a lake there are say 32 pegs, so my array is (1,2,3,4,5.etc to.32) I want the user to complete a form, and the script to randomly select one of the above numbers, data returned is say "David" "Peg 5".
I need David and his peg (5) to be logged into a MySQL database and the number 5 to disapear from my array.
Any help to kick me off would be most appriciated. Im not fantastic with PHP but I know a bit, I just cant seem to get started!
Thanks in advance
Si