<?
session_start();
if($userType != 'm')
	header("Location: logout.php");

require("DB.php");

$db = new DB("andromeda", "gradinfo");
$db->connect();

/*if( empty($form[project]) || empty($form[sponsor]) || empty($form[pYear])){
	$eProject = 1;
	session_register('eProject');


		//header("Location: gradStud.php");
	header("Location:addProjectForm.php?event_id=$st_id");
		exit;

}

else{
*/	// store in one field.
	$tmp = $form[pSemester]." " .$form[pYear];
	$pNam = $form[project];
	$pSpon = $form[sponsor];

	$projectObj = new Project($pNam, $pSpon, $tmp);

	$result = $db->putProject($st_id, $projectObj);


		header("Location: gradStud.php");
		exit;
	
//}
?>
