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

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