<?php 
session_start();
include 'dbc.php';

date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");

$userid=$_SESSION["userid"];
$sno=$_POST["sno"];
$item_no=$_POST["item_no"];
$type_name=$_POST["type_name"];
$item_name=$_POST["item_name"];
$cost_price=$_POST["cost_price"];
$retail_price=$_POST["retail_price"];
$bal=$_POST["bal"];
$disc=$_POST["disc"];
$barcode=$_POST["barcode"];
$salert=$_POST["salert"];
$bname=$_POST["bname"];
$ven_name=$_POST["ven_name"];


$sql = "Insert into items (id,sno,item_no,type_name,item_name,cost_price,retail_price,bal,rfid,user_id,disc,salert,bname,ven_name) values (null,'$sno','$item_no','$type_name','$item_name','$cost_price','$retail_price','$bal','$barcode','$userid','$disc','$salert','$bname','$ven_name')";
$conn->query($sql);

header("location:Add_Items.php");

?>
