how do you have variables available in the next page called

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

how do you have variables available in the next page called

Post 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
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post 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;
?>
Post Reply