<?php session_start();?>

<?php
	if($_SESSION ["role"]=="Evaluator")
	{
		$role = $_SESSION["role"];
		$email = $_SESSION["email"];
		// header('location:form.php');
	}
	else
	{
		header('location:index.php?expired session please login back');
		// $userName = $_SESSION["userName"]; $userRole = $_SESSION["userRole"];
		}
?>
<?php

require ("_common/global.php");
require ("_common/conn.php");
//require ("_common/function.php");
require ("_common/check_session.php");
  
?>
 
<?php
		
$idvac =$_REQUEST['idvac'];
//$email =$_SESSION['email'];
	$conn = mysql_connect('localhost', 'dvsvigov_vacc', 'DVSvacdos123');
	 if (!$conn)
    {
	 die('Could not connect: ' . mysql_error());
	}
	mysql_select_db("dvsvigov_vacdos", $conn);
$result = mysql_query("SELECT * FROM dossierform WHERE idvac='$idvac' AND Assess='$Assess'");
$test = mysql_fetch_array($result);

	$statusform = $_POST['statusform'];
	//$address = $_POST['address'];
	$datesubmit = $_POST['datesubmit'];
	$Assess = $_POST['Assess'];
	
		
	mysql_query("UPDATE IGNORE dossierform SET statusform='$statusform', datesubmit='$datesubmit' WHERE  Assess='$Assess' AND idvac='$idvac'")
				or die(mysql_error());
	mysql_query("UPDATE IGNORE vacc SET statusform='$statusform' WHERE idvac='$idvac'")
				or die(mysql_error());
//echo "1 record modified";
header('location: listcomplete.php');
mysql_close($link)

//mysqli_query($link, $sql);
//header('location: assignevaluator.php');
//mysqli_close($link);
?>