<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<?php
require("connect.php");
if(isset($_REQUEST['del_id']))
	{ 
	
	$id = $_REQUEST['del_id'];
	$sql="DELETE from tb_gadget   WHERE Gadget_id = $id";
	mysql_query($sql)or die("ไม่สามารถลบข้อมูลได้") . mysql_error();
									echo"<script language='JavaScript'>";
									echo"alert('ลบข้อมูลเรียบร้อยแล้ว');";
									echo"</script>";		
									echo "<meta http-equiv='refresh' content='0;url=Mainpage.php' />";
	//header( "Location: category.php" );
}
?>
</html>