...

View Full Version : Increase number per refresh



TrainReq
02-25-2008, 11:23 AM
Say if i wanted to echo a number starting at 400 , then every time I refresh it goes 401 , 402 , 403 , etc. How would I go about doing that? The way I would think about it going is it will set a session saying "current number is 400" , then on refresh it will basically say "if number is 400 , go to 401 , if number in session is 401 set the session 402 , and echo the number 402 , if the number in session is 402 , then set the session to 403 , etc and on up" , but how could I do that.

Inigoesdr
02-25-2008, 03:07 PM
session_start();
if(!isset($_SESSION['current_number']))
$_SESSION['current_number'] = 400;
else
$_SESSION['current_number']++;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum