Thread: eh?
View Single Post
Old 10-03-2003, 04:18 PM   · #2
web guru
NamePros Member
 
Trader Rating: (0)
Join Date: Jul 2003
Posts: 120
NP$: 185.00 (Donate)
web guru is an unknown quantity at this point
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.


Please register or log-in into NamePros to hide ads
web guru is offline   Reply With Quote
Site Sponsors
Traffic Down Under http://www.mobisitetrader.com/ Traffic Down Under
Advertise your business at NamePros
All times are GMT -7. The time now is 03:17 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.