Posted by Stefan Mueller on 10/02/23 11:32
>> But how can I read these numbers from my second frame with my PHP script?
>> Is that possible or how can I determine if my page has already been
>> loaded
>> once?
>
> You don't, use cookies or sessions
>
> www.php.net/manual/en/function.setcookie.php
> www.php.net/manual/en/ref.session.php
Thanks a lot for your hint.
I use now
===============================
session_start();
if (!isset($_SESSION["count_session"])) {
$_SESSION["count_session"] = 1;
}
else {
$_SESSION["count_session"]++;
}
===============================
> I thought I could save the first random numbers to my second frame (hidden
> text box) and if the user reloads the page my PHP script could use these
> saved random numbers.
Therefore I can do
if ($_SESSION["count_session"] == 1) {
generate new random numbers
store them somewhere (where to store them?)
} else {
use the already created numbers (where to store them?)
}
But where do I have to store my already created random numbers so I can use
them the next time the PHP page gets loaded.
PS: I don't like to use cookies
Stefan
Navigation:
[Reply to this message]
|