How long will a PHP login $_SESSION last?
by Pedroski from LinuxQuestions.org on (#4Z4MK)
Coz of this virus here in China, our new term will not begin on the 17th Feb. School will remain closed. My boss asked me to try and do class online.
The students have to login. This is not really because of security, no sensitive data here. I use the login to catch attendance in mysql:
Code:include $_SERVER['DOCUMENT_ROOT'] . '/includes/studentdbReadfrom.inc.php' ;
try
{
// attendance will not increase with multiple logins. Before next week, reset has_been_incremented to zero
$sql = 'UPDATE 19BEattendance SET attendance = attendance + 1,
has_been_incremented = has_been_incremented + 1, time = LOCALTIME()
WHERE number = ' . $_POST['password'] . ' AND has_been_incremented != 1 ;';
$pdo->exec($sql);
}This stuff is all new to me, I'm learning it on the fly!
How long will a login session last?
Where can I set it to 100 minutes? That would be our normal 2 class periods + 10 minutes break.


The students have to login. This is not really because of security, no sensitive data here. I use the login to catch attendance in mysql:
Code:include $_SERVER['DOCUMENT_ROOT'] . '/includes/studentdbReadfrom.inc.php' ;
try
{
// attendance will not increase with multiple logins. Before next week, reset has_been_incremented to zero
$sql = 'UPDATE 19BEattendance SET attendance = attendance + 1,
has_been_incremented = has_been_incremented + 1, time = LOCALTIME()
WHERE number = ' . $_POST['password'] . ' AND has_been_incremented != 1 ;';
$pdo->exec($sql);
}This stuff is all new to me, I'm learning it on the fly!
How long will a login session last?
Where can I set it to 100 minutes? That would be our normal 2 class periods + 10 minutes break.