Necuima 18 Posted September 30, 2013 Report Share Posted September 30, 2013 Hi, I am having problems understanding just how to use this. On page 84 there is a diagram showing the procedural flow. I can successfully create the session and load some data into it. A check of the database table shows that the data is correctly loaded. The problem that I am having is retrieving that data in a separate PHP script. The comment on the bottom of the diagram says that every time that a session is started the 'open' and 'read' functions are called. How do I 'see' what is in the session in the second script, i.e., one that gets invoked after the session is initially created? If I do a if (empty($_SESSION)) (after the 'session_start()') it tests as empty? If I do a get_defined_vars(), again after the 'session_start()', it shows that the session is empty? My environment is: . Windows 7 Home Premium 64 bit. Internet Explorer 10. Firefox 22.0. Dreamweaver CS5 as the text editor . XAMPP for Windows 1.8.3 which comprises: .. Apache 2.4.4 .. PHP 5.5.3 .. MySQL 5.6.11 .. phpMyAdmin 4.0. Any help will be most appreciated. Thanks, Necuima Quote Link to post Share on other sites
Necuima 18 Posted September 30, 2013 Author Report Share Posted September 30, 2013 OK, found what I was doing wrong. I probably didn't read Larry's notes closely enough. In a nutshell, I interpreted the 'session_start()' literally (Figure 3.4 - the 'some other script'). What I needed to do was to include the db_sessions.inc.php file which starts the session anyway. Posted here in case it may help someone else! Cheers from Oz, Necuima. Quote Link to post Share on other sites
Larry 428 Posted September 30, 2013 Report Share Posted September 30, 2013 Awesome. Glad it makes sense and thanks for sharing. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.