Jump to content

PHP Function to Check if User is Logged


teparky

Recommended Posts

Hi Guys,

 

Just a quick introduction I am NOT a student I am a IT Technician in a School in the South of the United Kingdom.

 

I am trying to write a PHP Script with a Function that Checks if the user is logged in, if the user is logged in then it shows the user the content on the page but if they are not logged in then to show a blank page with a link to the Login Page. I need it to be simple. I just want it to check if a useer is logged in but if there not only show some content on a page.

 

Can anyone help? My Users login into a php Session.

 

Thanks for any help you can offer.

 

Best Regards

Thomas

Link to comment
https://forums.phpfreaks.com/topic/252505-php-function-to-check-if-user-is-logged/
Share on other sites

There's plenty of tutorials online to help you do this... here's a couple...

 

http://www.devshed.com/c/a/PHP/Creating-a-Secure-PHP-Login-Script/

a newer one: http://frozenade.wordpress.com/2007/11/24/how-to-create-login-page-in-php-and-mysql-with-session/

 

If you have code you need help you can post it here...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.