Jump to content
Larry Ullman's Book Forums

Chapter 12 Script 12.7 Login/logout Header.html

Recommended Posts

There is a similar posting but they don't have id's so that was the topic title 'Chap 12 - 12.6 Example' which doesn't look like it was resolved.

Due to the advances in web browsers I can't review the cookies as per the example K on page 387.


First of all, on script 12.7, there seems to be a typo on line 3: <head"> (the double quotation mark).


When I first load index.php the header.html displays Logout which seems strange as I haven't logged in yet. Selecting Logout takes me back to index.php and the header.html is still displaying Logout.


When I load login.php directly I can login and the browser displays 'first_name' and the logout button below.


However, when logged in, the header is displaying Login.


I can select logout below 'first_name' and am logged out with the logout.php script but the header still displays Login.

I have tested in Firefox and Chrome with the same results. I have checked the scripts character ny character.

Apache Version: 2.4.23

PHP Version: 5.6.25

Firefox: 58.0.2 (64-bit)

Chrome: Version 64.0.3282.186 (Official Build) (64-bit)


Link to comment
Share on other sites

Thanks for reporting the error; I'll get that fixed! 


As for reviewing cookies, things have changed in the browers, but there's still some way. It just depends upon your browser and OS version. For Chrome, it should be under Developer Tools and then either "Storage" or "Network".


I suspect the problem here is due to a session cookie, but couldn't be sure. I'd start by clearing all your local cookies and then retrying. If you're still having the problem, then maybe post the applicable code. 

Link to comment
Share on other sites

  • 2 weeks later...

  • Create New...