<?php
    session_start();
    if(!isset($_SESSION['authen_id'])){
        header('location:index.php');
    }
    include_once('connect.php');
    
    $sql_del = "DELETE FROM `sports_eq` WHERE `sports_eq`.`sports_id` = '".$_GET['id']."'";
    $result_del = $conn->query($sql_del) or die($conn->error);
    if($result_del){
        echo '<script> alert("ลบข้อมูลสำเร็จ")</script>';
        header ('refresh:0; url:product.php');
    }
?>																															
						 
												
						
					
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syn
session_start();
if(!isset($_SESSION['authen_id'])){
header('location:index.php');
}
include_once('connect.php');
$sql_del = "DELETE FROM `sports_eq` WHERE `sports_eq`.`sports_id` = '".$_GET['id']."'";
$result_del = $conn->query($sql_del) or die($conn->error);
if($result_del){
echo '<script> alert("ลบข้อมูลสำเร็จ")</script>';
header ('refresh:0; url:product.php');
}
?>