<?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["class_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"];


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

header("location:Add_Items.php");

?>
