I currently have a working code that adds an order inside an event calendar, but I wan't to add the expiration date that comes with the order (30 days after the order has send).
//Include db configuration file
include 'connect.php';
$currentDate = date("Y-m-d H:i:s");
//Insert the event data into database
$insert = $conn->query("INSERT INTO events (title,date,created,modified,tht) VALUES ('".$title."','".$date."','".$currentDate."','".$currentDate."','".$date." + INTERVAL 30 DAY')");
if($insert){
echo 'ok';
}else{
echo 'err';
}
Currently this code is working just fine, however shipping date is the same as expiration date, instead of the 30 days later that I want. What am I missing here?