<?php session_start(); 
	include('conn.php');
?>
<!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" />
<title>Untitled Document</title>
</head>
<body>
<?php
	if($_GET['status']!=""){
		if($_GET['status']=="delete"){
			$sql = "DELETE FROM  sale WHERE id_sale  = 	'".$_GET['id_sale']."';";
			mysql_query($sql);
			echo "<meta http-equiv=\"refresh\" content=\"0;URL=update_user.php?user=".$_SESSION['user_chk']."\" />";
		}else{
			$sql_sale = "UPDATE sale SET status= '".$_GET['status']."'	WHERE id_sale  = '".$_GET['id_sale']."';";
			mysql_query($sql_sale);
			echo "<meta http-equiv=\"refresh\" content=\"0;URL=menu_sale.php?status=".$_GET['status']."\" />";
		}
	}

?>
</body>
</html>