$login=$_SESSION['login'];
$text=$_REQUEST['text'];
$t1=$_REQUEST['t1'];
$t2=$_REQUEST['t2'];
$t3=$_REQUEST['t3'];
$t4=$_REQUEST['t4'];
$t5=$_REQUEST['t5'];
$t6=$_REQUEST['t6'];
$ok=$_REQUEST['ok'];
$select = $_REQUEST['select_group'];
$teacher = $_REQUEST['select_teacher'];
if ($ok==true){
$add = mysql_query ("INSERT INTO groups (text, login, t1, t2, t3, t4, t5, t6, category, teacher) VALUES ('$text', '$login', '$t1', '$t2', '$t3', '$t4', '$t5', '$t6', '$select', '$teacher')");
if ($add==true){
echo "Група додана";
echo "<HTML><HEAD>
<META HTTP-EQUIV='Refresh' CONTENT='0; URL=admin.php?action=group'>
</HEAD>";
} else echo "Не уникальное поле!";
}