How do I create a timed ban on an account? (PHP/mysql)
- by ggfan
I want to create a function that allows me to ban an account for 10days.
In the dbc, I have a field called "ban" and Boolean of 1=notban, 0=ban. I also have a field called "date_banned" which is just the timestamp of when the user got banned.
My question is how do I create a time frame of 10days from the date the user was banned?
ex: James was banned on "2010-05-03 20:43:48". So how can I go about adding 10days to the timestamp? And after 10days, it would set the "ban" equal to 1(which is not banned).