Here's what I need to do:
- I want to insert a date into a datetime MySQL field 30 days from from the current date
- When I pull that specific record, I want to be able to check whether that date has passed yet or not (i.e. expiration date)
Here's what I need to do:
For your insert:
$thirty_days_from_today = date('Y-m-d H:i:s', time() + 60*60*24*30);
Checking expiration dates:
if(strtotime($row['expiration_date']) < time()) {
// expired
}