<?
 session_start();
 if(strlen($iname)<=0)
 {
  print "<font face=verdana color=red>Insufficient Entry</font>";
  include("itemmas.php");
  return;
 }
$code=substr($iname,0,3).substr(time(),7,3);
$itemcode=str_replace(' ','-',$code);
 $sql="insert into itemmas values('$itemcode','$group','$iname','$descri')";
 include("opendb.php");
 mysqli_query($db,$sql)or die(mysqli_error());
 include("itemmas.php");
print "<script>parent.main.location='itemlist.php'; </script>";
?>
