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.