note 17456 rejected from function.rand by jimw

From: Date: Tue, 18 Dec 2001 19:33:51 +0000
Subject: note 17456 rejected from function.rand by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23160@lists.php.net to get a copy of this message
[Page1.php] $seed = rand(1000000000,9999999999); echo "Seed = $seed"; [Page2.php] require("Page1.php"); echo "Seed = $seed"; [Output:] Page1 Seed = XXXXXXXXXX (Random 10 Digit Number) Page2 Seed = XXXXXXXXXX (A Different Random 10 Digit Number) I need help resolving the following issue: On a page, I set a variable as a randon number using the code above I find that when I call the variable from different pages, the random number in the variable changes. How can I get the initial random number passed from one page to another, without a new number being generated? Any Ideas???? -Darkive

« previous php.notes (#23160) next »