problem with Cookies

O

old.Nugit

Guest
Hello everybody... I'm new on this forum and on BarrysWorld histing service... I had a site on a other provider and just move it to BarrysWorld to having more efficient PHP scripts... and now, one of my script isn't working... This script has just one line and is used for me to not count my own visit on my site... here is the line :
setcookie ("AAAAA", "aaaa", time () + 86400, "/", $SERVER_NAME);

then on my welcome page, I watch the AAAAA variable and if it exists, I don't change the visit's counter. The problem is since I'm on BarrysWorld server, my counter is incremented on each visit.

If someone could help me, please ... :rolleyes:
 
O

old.Nugit

Guest
it's OK, I found the problem... I suppress space on the line and it works now... :D
 
T

Tempy_Incursion

Guest
Cookies are a pain sometimes anyway, especially when they have to be sent with the header info. I've had trouble with them on my site when some cannot login as the cookies arent sent on their system. :(
 
O

old.Mozzer

Guest
sessions are a lot easier and better I think..

eg:

$name = "barry";
$pass = "world";

session_start();

session_register('name');
session_register('pass');

if ($name == "barry") { echo ("Hi $name") } else { echo ("Who the HELL are you?"); }
 
T

Tempy_Incursion

Guest
When I first use sessions (for my site below), they worked fine offline but on BW they never did, as they never set to have 'PHPSESSID' added automatically to every link in php.ini. :(

But, maybe now they do! :confused:
 
O

old.Mozzer

Guest
I don't use Barrysworld... Never have, I just like there forums! :p

I use qwerf.com becuase my m8 runs it and I get 1GIG of space and transfer for £1.50 per month!
 

Users who are viewing this thread

Top Bottom