I want to set event to the input day. For example, if a user inserts a query on Tuesday and the schedule of the subject is Friday, how can I create an event that will be activated every Friday?
$sql = "SELECT * FROM subjects where day='$day' and starttime='$starttime' and endtime='$endtime' and yearlevel='$yearlevel' ";
$result =$conn->query($sql);
$row_cnt = $result->num_rows;
if ($row_cnt < 1) {
$add="INSERT INTO subjects (subjects, day, starttime, endtime, yearlevel)
VALUES ('$subjects','$day','$oper','$oper1','$yearlevel')";
$result2 =$conn->query($add);
$event="CREATE EVENT {$subjects}attendance ON SCHEDULE EVERY 1 WEEK
STARTS 'CURDATE() 06:00:00'
";
}