Skip to content
Advertisement

PHP session update at certain time

I have a php website where I need to unsubscribe a student after one month for example .. for each student I have a “subscribed” value in the mysql database where it can be 0 (unsubscribed) or 1 (subscribed).. I also have a registration date whereby I can know the time after one month for each student. the question is, how can I unset the “logged in” and the “subscriebd” session at that time?.. how can I log that user out ?.. because even if I update the database and the subscribed becomes 0 instead of 1 .. the session won’t refresh on its own and it will remain 1 ..

Thanks

Advertisement

Answer

You can always use

unset($_SESSION['sessionid']);
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement