billskipton Posted March 13, 2007 Share Posted March 13, 2007 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 Link to comment https://forums.phpfreaks.com/topic/42472-solved-session-works-on-one-computer-but-not-another/ Share on other sites More sharing options...
only one Posted March 13, 2007 Share Posted March 13, 2007 id advise using mysql to insert the persons ip and have an auto increaing id for it Link to comment https://forums.phpfreaks.com/topic/42472-solved-session-works-on-one-computer-but-not-another/#findComment-206053 Share on other sites More sharing options...
billskipton Posted March 13, 2007 Author Share Posted March 13, 2007 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 Link to comment https://forums.phpfreaks.com/topic/42472-solved-session-works-on-one-computer-but-not-another/#findComment-206085 Share on other sites More sharing options...
billskipton Posted March 13, 2007 Author Share Posted March 13, 2007 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!!!!!! Link to comment https://forums.phpfreaks.com/topic/42472-solved-session-works-on-one-computer-but-not-another/#findComment-206116 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.