I am adding a welcome message in my header file which is included in every page.
If a user is logged in, they would see a message like: Welcome, Debbie!!
What is the best approach to take to make sure this feature always works?
Can I just look in the $_SESSION for the "LoggedIn" status and "UserName", or is that not reliable enough?
Seems to me that about 3 weeks ago I got into a heated debate with others about the merits of using SESSIONS.
Do I instead need to check for the "LoggedIn" status and "UserName" from MySQL on every page instead?! (That seems excessive and like a real resource-hog?!)
Sincerely,
Debbie
If a user is logged in, they would see a message like: Welcome, Debbie!!
What is the best approach to take to make sure this feature always works?
Can I just look in the $_SESSION for the "LoggedIn" status and "UserName", or is that not reliable enough?
Seems to me that about 3 weeks ago I got into a heated debate with others about the merits of using SESSIONS.
Do I instead need to check for the "LoggedIn" status and "UserName" from MySQL on every page instead?! (That seems excessive and like a real resource-hog?!)

Sincerely,
Debbie
Comment