<?php
session_start();
ob_start();
require "../model/configuration.php";
$msg = NULL;
if(isset($_POST['prdct_add']))
{
	
	$papersize = $_POST['papersize'];

$usrqry=$db->execute("select * from paper_type where papertype='$papersize' and del='0'");
if($usrqry->num_rows > 0)
{
	$msg="Product Exist";
	header("location:../Pages/Papertype_add.php?msg=$msg");
}
else
{
	$query = $db->execute("INSERT INTO paper_type(papertype) VALUES('$papersize')");
	header("location:../Pages/Papertype_add.php");
}
}
?>