<?
session_start();
include("opendb.php");
if(strlen($group)<=0)
{
 print "<font face=verdana color=red>Insufficient Entry </font>";
 include("group.php");
 return;
}
$code=substr($group,0,3).substr(time(),7,3);
$code=str_replace(' ','-',$code);

$sql="insert into groups values('$code','$group','$desc')";
mysqli_query($db,$sql) or die (mysqli_error());
include("group.php");
?>
