извините пожалуйста за детский вопрос, необходимо сделать удаление записей по checkbox, что то не получается. где ошибка? Подскажите пожалуйста
$search_date_array = get_event($action, $time_recv);
for ($i = 0; $i < count($search_date_array); $i++) {
echo '<hr/>';
echo '<table>';
echo '<tr><td><strong>Время</strong></td><td>' . $search_date_array[$i]->time_recv . '</td></tr>';
echo '<tr><td> </td><td> <input type="checkbox" name="checkbox" value="1" ' . ($search_date_array[$i]->time_recv == "1" ? ' checked="checked"' : "") . ' /></td></tr>';
echo '</table>';
echo '<br/>';
echo '<input type="submit" name="delete" value="delete"/>';
}
if(isset($_GET['delete']))
{
for ($i=0;$i<$search_date_array;$i++)
{
$time_recv = $_POST['checkbox'][$i];
$sql = "DELETE FROM event_logs_month WHERE time_recv ='$time_recv'";
$result = mysqli_query($page->mysqli_handle, $sql);
}
}
Большое спасибо.