$ceiling is too big.

try to do this and see:
echo getrandmax();
you might get 32767 as an output!

therefore, $ceiling must be <= getrandmax();

try to scale down your floor and ceiling,
ie:
$max = $ceiling - $floor;
$random = rand(0, $max) + $floor;

"Andrew Duck" <[EMAIL PROTECTED]> wrote in message
005f01c15ea6$30375800$0100007f@localhost">news:005f01c15ea6$30375800$0100007f@localhost...
#Create Random number
  $floor = 100000;
  $ceiling = 999999;
  srand((double)microtime()*1000000);
  $random = rand($floor, $ceiling);

Warning: rand(): Invalid range: 100000..999999 in c:\my
documents\ezone\testing\signup2.php on line 49

Can someone please tell me where i went wonr gin this coding.

Thanks




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to