<?php
session_start();
$username = $_SESSION['staff'];

$invNo=$_POST['invNo'];
$invDate = date("Y-m-d");
$invStatus = $_POST["invStatus"];
$invNote = $_POST["invNote"];

if($_POST["Submit"] == "Submit")
	{
	include ("connect.php");
	$result = mysql_query("INSERT INTO invstatus(invNo, invSDate, invStatus, invNote)
	VALUES
	('$invNo', '$invDate', '$invStatus', '$invNote')");
	
	$db = mysql_close();
	echo "<script language='javascript'>alert('Status Update success.')</script>";
	echo "<script language='javascript'>window.location='invlist.php'</script>";
}else{
echo "<script language='javascript'>window.location='invlist.php'</script>";
}

?>