PHP Ramdom selector working details.
Posted on 2006-06-02
I am writing a report on the workings of a Radom selector that I have on our website. The selector is built in PHP coding (version 4.3.11) on a MySQL database (version 4.0.27)
How it works is once enabled and a member joins that are being placed into a member’s database. When we click the select winner button it generates a member randomly.
We use this for competition purposes. We need to know the functionality of the coding. We need as much information on the operating procedures as possible. If there are any other examples on the web.
Here is the code
<form name="formwinner" method="post" action="membergetmember.php">
<input type="hidden" name="txtwinner" value="<?print($arr[rand(0,$counter-1)]);?>">
<input type="submit" name="Submit2" value="Select Winner !">
//print("randon no is: ".rand(0,$counter-1)." ");
// print($jj." ".$arr[$jj]."<BR>");