Jump to content
Larry Ullman's Book Forums

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)

 

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

Larry, 'guilty as charged'. User error.

Script 12.7 line 20: if ( (isset

 

I had: if ( (!isset

and only realized when I changed the script in 12.10. Humble apologies.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...