Your IP : 10.1.73.149


Current Path : /home/bolconlineco/public_html/aaaaaa/admin/
Upload File :
Current File : /home/bolconlineco/public_html/aaaaaa/admin/add_category.php

<?php

include('../includes/connection/func.inc.php');  
  if(isset($_POST['submit']))
  
    {
	 
	  $categoryname = sql_strip($_POST['categoryname']);
	  
	   $categoryorder=sql_strip($_POST['categoryorder']);
	  /*$sql1="select max(CategoryOrder) as maxs from category";
	  
	  $result11=mysql_query($sql1) or die(mysql_error());
	  
	  $row=mysql_fetch_array($result11);
	  
	  $next=$row['maxs'];
	  
	  $next=$next+1;
	  
	 $categoryorder = !empty(sql_strip($_POST['categoryorder']))? sql_strip($_POST['categoryorder']):$next;
	  */
	  $CStatus = sql_strip($_POST['CStatus']);
	  
	  $sql="insert into category values ('','$categoryname','$categoryorder','$CStatus')";
	  
	  $result=query($sql);
	  
	  if($result)
	   {
		 $msg = "Inserted Successfully";
		 
		 header("location:category.php?msg=$msg");
		 
		 exit(); 
	   
	   }else
	   {
		  $msg = "Can't Inserted due to some Errors";
		 
		  header("location:category.php?msg=$msg");
		 
		  exit(); 
	   }
	  
	  
	 		}

?>