in reply to saving a random number while generating a new one
HTML is a stateless protocol. Usually you need external storage to remember anything. In your case I think there is a simple solution though. You can store the values in the link. Use something like print "<a href=\"dice.cgi?rolla=$rolla:rollb=$rollb\">roll again</a>". Check out the CGI documentation how you can access the parameter list
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: saving a random number while generating a new one
by friar tux (Novice) on Mar 30, 2011 at 17:17 UTC |