php login session. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

php login session.

I would like to design a valid login form with session. Such that, a user can log in for a period of 24hrs before the user is automatically logged out. I want to show premium content, based on the user's subscription plan. kindly how is the php code look like regarding the login session ?

17th Nov 2018, 9:54 AM
COSMUS NGUAH
COSMUS NGUAH - avatar
1 Answer
0
you can use sessions.. for this, and based on the time, you destroy the session.. so on the main page of your interest you start a session and if the session is destroyed, user is logged out.. OR use a cookie and set the time for.it to destroy
5th Dec 2018, 10:34 PM
Otumian Empire
Otumian Empire - avatar