<?php include("../core/kfunctions.php"); ?>
<!DOCTYPE html>
<html lang="en">
<head>


 </head>
<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed"> 
 <?php kheader(); ?> 
<?php kleftbar(); ?>
<div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h5>Multiple Entries</h5>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="../index.php">Home</a></li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->

<section class="content">
      <div class="container-fluid">
        <div class="row">
          <section class="col-lg-4 connectedSortable">
<div class="card card-info">
              <div class="card-header">
                <h3 class="card-title">Add New Category</h3>
              </div>
              <div class="card-body">
<?php
if(isset($_POST["submit_category"])){
$category=$_POST["category"];

$yy=date("Y"); $fyy=substr($yy,2,2);
$mm=date("m"); $dd=date("d");
$hi=date("h"); $mi=date("i");
$sa=date("sa"); $sa=date("s");
$categoryid="cat".$rolenumber.$fyy.$mm.$dd.$hi.$mi.$sa;

$insert_scrap=$dbh->prepare("insert into scrap (item,item2,type) values('$categoryid','$category','event_category')");
$insert_scrap->execute();
echo "<div class='col-lg-12 alert alert-success'>New Category Added: </div>";
}
?>
<form method="post">
 <div class="row">
<div class='col-lg-12'>
<input type='text' class='form-control' name='category' placeholder='Category' required>
</div>
</div><br>
<div class='form-group'>
<input type="submit" class="btn btn-sm btn-primary col-lg-12" name="submit_category" value="Submit">
</div>

</form>
</div>
</div>
</section>

</body>
</html>
