简体   繁体   中英

On cookie expire, delete MySQL row

I want to delete the row on the MySQL table corresponding with the cookie when the cookie expires or is deleted. How would I do this using PHP?

You can't do that directly. The best hope you have is to have an expires column in your database, which saves the date/time at which the cookie expires, then you could have a cron script to delete the expired rows.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM