<?php 
include 'connection.php';
session_start();
if (!isset($_SESSION['is_logged_in'])) {
    header("Location:login.php");
    die();
    }
date_default_timezone_set('Asia/Calcutta');
$today = date("Y-m-d");
$time = date("h:i A"); 
$currentyear = date("Y");
$currentmonth = date("m");
$querylogin = "select * from mst_users where user_name = '". $_SESSION["LOGIN_NAME"]."' AND password = '".$_SESSION["EMPLOYEE_PASSWORD"]."'";
$resultlogin = mysqli_query($conn,$querylogin);
while($row=mysqli_fetch_array($resultlogin))
{
$user_id = $row['user_id'];
$staff_name = $row['staff_name'];

}
  
													
$material_name=$_POST['material_name'];


$qrycall = "insert into material_master(material_name) values ('$material_name')";
$rcall=mysqli_query($conn,$qrycall);

?>



<script>
javascript:window.location.href="view_all_bar_material_master.php";
</script>


