Jump to content

[SOLVED] SESSION works on one computer but not another


billskipton

Recommended Posts

basic program...

session_start();

if (isset($_SESSION['ordernumber'])) {

    $order = $_SESSION['ordernumber'];

} else {

    ... generate order number...

    $_SESSION['ordernumber'] = $order;

}

... update order ...

On one computer the order number is kept between invocations of the page, on another it isn't and a new order number is generated each time. Both have cookies enabled and both run windows xp

Great idea - it's what I've actually done (or something similar). I generate an order number by using the MySql insertion number.

My problem is that I've been doing this for about 4/5 weeks whilst putting the system together. Feeling quite pleased with it, decided to show 'the wife' on her computer (which is similar to mine but slightly older), but it didn't work! It doesn't appear to be generating a session ID. I can't think of any difference between her computer and mine which could screw it up. I've got windows XP on both and both use Zone Alarm and both have cookies enabled. It's the same program, being accessed from my domain server. So I'm mystified. :-\

Thanks for trying to help.

Bill

SOLVED!

 

I realised that the difference between my computer and my wife's, was what was in the program/file cache. Went into tools/options (internet explorer) and deleted cookies, files, etc. Now the program works the same on both computers. There was an error, but my cache was covering it up by using an older version of a module which I had changed incorrectly.

Another lesson learnt the hard way!!!!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.