<?php
    include "Admin/config/setup.php" ;
    $date = date('Y-m-d',strtotime('today'));
    $chk_sql = $config->query("SELECT * FROM event_post WHERE l_date <= '$date' ") ;
    foreach($chk_sql as $chk){
        $id = $chk['event_id'];
        $sql = $config->query("UPDATE event_post SET l_status = 1 WHERE event_id = '$id' ") ;
    }

?>