$family = $_SESSION['family']; $name = $_SESSION['name']; $patronymic = $_SESSION['patronymic']; $group = $_SESSION['group']; $specialty = $_SESSION['specialty']; $discipline = $_SESSION['discipline']; $db = mysql_connect ('***.***.***.***','*****','*****'); mysql_select_db ('*****',$db); $result = mysql_query ("INSERT INTO user (family,name,patronymic,group,specialty,discipline) VALUES('$family','$name','$patronymic','$group','$specialty','$discipline')"); if ($result == 'TRUE') { unset($_SESSION['family']); unset($_SESSION['name']); unset($_SESSION['patronymic']); unset($_SESSION['group']); unset($_SESSION['specialty']); unset($_SESSION['discipline']); exit ("<html><head><meta http-equiv='Refresh' content='3; URL=".$_SERVER["REQUEST_URI"]."'></head></html>"); } else { exit ("<html><head><meta http-equiv='Refresh' content='2; URL=".$_SERVER["REQUEST_URI"]."'></head></html>"); }