<?php
include('../headertop.php');
include('../db.php');
//include('../datepicker.php');

$disp = '';
$pagetitle = 'Add New Project';

if(!isset($_POST['addworktypesubmit']))
{
echo '<meta http-equiv="refresh" content="0;URL=addworktype.php">';
exit;
}

$work_type = $_POST['work_type'];

if(empty($work_type))
{
echo '<meta http-equiv="refresh" content="0;URL=addworktype.php?sm=Please enter some value">';
exit;
}

$q = "insert into work_type(work_type) values('$work_type')";
mysqli_query($dbcon,$q) or die(mysqli_error());

$sm = 'Work Type Data Saved';
echo '<meta http-equiv="refresh" content="0;URL=addworktype.php?sm='.$sm.'">';