$action=$_REQUEST['action'];
if($action=="create_session_today_action")
{
$query="SELECT @date:= CAST(CONCAT(CAST(YEAR(NOW()) AS CHAR), '-', CAST(MONTH(NOW()) AS CHAR), '-', CAST(DAYOFMONTH(NOW()) AS CHAR), ' ', '09:00:00') AS DATETIME);
SELECT @session1:= DATE_ADD(@date, INTERVAL '45:0' MINUTE_SECOND);
SELECT @session2:= DATE_ADD(@date, INTERVAL '90:0' MINUTE_SECOND);
SELECT @session3:= DATE_ADD(@date, INTERVAL '135:0' MINUTE_SECOND);
SELECT @session4:= DATE_ADD(@date, INTERVAL '180:0' MINUTE_SECOND);
SELECT @session5:= DATE_ADD(@date, INTERVAL '225:0' MINUTE_SECOND);
SELECT @session6:= DATE_ADD(@date, INTERVAL '270:0' MINUTE_SECOND);
SELECT @session7:= DATE_ADD(@date, INTERVAL '315:0' MINUTE_SECOND);
SELECT @session8:= DATE_ADD(@date, INTERVAL '360:0' MINUTE_SECOND);
SELECT @session9:= DATE_ADD(@date, INTERVAL '415:0' MINUTE_SECOND);
SELECT @session10:= DATE_ADD(@date, INTERVAL '450:0' MINUTE_SECOND);
SELECT @session11:= DATE_ADD(@date, INTERVAL '495:0' MINUTE_SECOND);
INSERT INTO sessions (timer) VALUES(@session1),(@session2),(@session3), (@session4), (@session5), (@session6),(@session7), (@session8), (@session9), (@session10), (@session11)";
$query=mysql_query($query);
echo mysql_error();
header("Location: index.php");
}