<!DOCTYPE html>

<?php
	session_start();
if (!isset($_SESSION['username'])) {
  header("location:login/main_login.php");
}

    // load up your config file
   include_once("setting.php");
   
    require_once(config);
    require_once(header);
?>
<div class="container">
<div class="row justify-content-md-center">
<?php include_once(menu_penal);
?>
</div>
<div class="row justify-content-center">
    <div class="col-5">
  <h2>Enter Pkg Detail</h2></div></div>
<?php     require_once(package);
echo "</div>";

if(isset($_POST['submit'])){
$name= $_POST['pkg_name'];
$detail = $_POST['pkg_detail'];
$amount = $_POST['pkg_amount'];
$date = $_POST['pkg_date'];
$sql = "INSERT INTO pkg(pkg_name,pkg_detail,pkg_price,pkg_date)
VALUES ('$name','$detail','$amount','$date')";

if ($con->query($sql) === TRUE) {
	        echo '<script type="text/javascript">alert("New record:::' . $name . ':::created successfully"); </script>';

   

} else {
    echo "Error: " . $sql . "<br>" . $con->error;
}

$con->close();
}
?>
</body>
</html>
