<?php
ob_start();
session_start();
if(!isset($_SESSION["intLine"]))
{
	 $_SESSION["intLine"] = 0;
	 $_SESSION["EMP_ID"][0] = $_GET["EMP_ID"];
	 $_SESSION["strQty"][0] = 1;

	 header("location:index.php");
	 // echo $_GET["id"] ;
	 // echo "ไม่ได้";
}
else
{
	$key = array_search($_GET["EMP_ID"], $_SESSION["EMP_ID"]);
	if((string)$key != "")
	{
		 $_SESSION["strQty"][$key] = $_SESSION["strQty"][$key] + 1;
	}
	else
	{
		 $_SESSION["intLine"] = $_SESSION["intLine"] + 1;
		 $intNewLine = $_SESSION["intLine"];
		 $_SESSION["EMP_ID"][$intNewLine] = $_GET["EMP_ID"];
		 $_SESSION["strQty"][$intNewLine] = 1;
	}
	 header("location:index.php");
	 // echo $_GET["id"];
	 // echo "ได้";
}
?>
