ID:               29507
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bassfranky at hotmail dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         *Math Functions
 Operating System: Linux
 PHP Version:      Irrelevant
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2004-09-11 14:30:49] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

Use a better seed or provide a reproduce script.

------------------------------------------------------------------------

[2004-08-03 16:38:20] bassfranky at hotmail dot com

Description:
------------
I use rand(min, max) in a php script in a web page that is working
pretty well.
But I also use it when this page open another (small) window
with another page that call the function rand() too.

This is working pretty well except when I reload the parent window and
open again the small one, then the rand() function will return exactly
the latest number !!!
Idem with srand() mt_rand()

For exemple on my parent window I click on my button "new"
this will open the small window and generate 5
I click again on "new" this will close and then reopen the small window
and generate 8
etc . . . 
and then if I click on new and it'll open the small window
and generate for exemple 6
after that I reload the parent window and click again on "new" I will
get a 6 again
After that if I click again on "new" it 'll be another one but if I
reload the parent again, I'll definitely get a 6 again, and so on . . .

Reproduce code:
---------------
$nb = mysql_num_rows($resultMorceau);
if ($nob > 0)
{
        srand();
        $hasard = mt_rand(0 , $nb-1);
        echo hasard;
}

Expected result:
----------------
I'd like to get a random number even if I reload my parent window frame
!



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29507&edit=1

Reply via email to