include("inc/inc.php"); if ($_SESSION['is_teacher']!=1) header("location:index.php"); //enter student data if ($_POST['submit_csoport']) { if ($_POST['gid']) { //if ($_POST['active']==1) { $active_now=1; } else { $active_now=0; } $result=mysql_query("UPDATE t_group SET name='".$_POST['name']."', location='".$_POST['location']."', active='1' WHERE gid='".$_POST['gid']."'"); } else { $result=mysql_query("INSERT INTO t_group (name, location) VALUES ('".$_POST['name']."', '".$_POST['location']."')"); } } ?>
|