This is a very delicate area, as of php4. Your local server if running php4 where your online server prob is running php3. Thats why it works onlin and not on your local server.
Try doing sessions this way
PHP Code:
session_start();
if(isset($_SESSION['count'] )){
$count = $_SESSION['count'];
$count++;
$_SESSION['count'] = $count;
}
else{
$count = 0;
$_SESSION['count'] = $count;
}
if(isset($_SESSION['count'] )){
echo $_SESSION['count'];
}
Instead of using
PHP Code:
session_register("count")
use
PHP Code:
$_SESSION['count']="whatever"
The only way your code will work is if you turn register_globals on, which as you say is bad practic but it also brings up a lot of security issues!!
Let me know if this is of any help at all.