Page 1 of 1

how do you have variables available in the next page called

Posted: Sat Jan 25, 2003 7:46 pm
by lazy_yogi
if i have a variable $num
and I have a script that refreshes every 5 seconds,
how can i access that variable after it refreshes in the next call to the script ?

I don't want to put it in the url, I don't want it to be visible.

Thanx

Posted: Sat Jan 25, 2003 8:13 pm
by qads
use sessions then:

Code: Select all

<?php
session_start();
$num = 5;
//uncomment the line below if you need to add the last $num value with current.
//$num = $_SESSION['num'] + $num;
$_SESSION['num'] = $num;
?>