php - How Count Time In Session Login -


i know many have asked login session. until have not found information obvious.

session have code this

session_start(); setcookie(session_name('kslogin'),session_id(),time()+2*7*24*60*60); 

it active 2 weeks only. want modify session 1 year or more, not know how started.

which makes me confused here because there 5 groups , not explained owner of tutorial.

could tell performance of code session , if there nothing better wrote above?

i fear there types of browsers not support session. thank you...

the code has:

2 weeks 2 x 7 days x 24 hours x 60 mins x 60 seconds:

setcookie(session_name('kslogin'),session_id(),time()+2*7*24*60*60); 

so change to:

1 year = 365 days x 24 hours x 60 mins x 60 seconds:

setcookie(session_name('kslogin'),session_id(),time()+365*24*60*60); 

Comments