<?php
include('config.php');

$ship_desc 	= $conn->real_escape_string($_POST['ship_desc']);
$act 		= $_POST['act'];
$autoid 	= $_POST['autoid'];

if($act=="add"){
	$sql = "INSERT INTO shipping_type (ship_desc) values ('$ship_desc')";
	$conn->query($sql) or die($sql);
}

if($act=="edit"){
	$sql = "UPDATE  shipping_type SET ship_desc = '$ship_desc' WHERE ship_autoid = '$autoid'";
	$conn->query($sql) or die($sql);
	}
	
if($act=="delete"){
	$sql = "DELETE FROM shipping_type WHERE ship_autoid = '$autoid'";
	$conn->query($sql) or die($sql);
	}
	

header('Location:index');
?>