<?php
	$db_name = "systems";
	$table_name = "sacTEST";
	$FLName = $_POST['FLName'];
	$auth = $_POST['auth'];
	$SACaccepted = $_POST['accepted'];
  
 	//Create a connection
	$connection = @mysql_connect("libitdb.lang.uc.edu", "phpadmin", "25or624") 
	              or die("Couldn't connect to database server.");
  
	//Select a database
	$db = @mysql_select_db($db_name, $connection) 
	      or die("Couldn't select $db_name database ");

	//SQL statement
	$query= "UPDATE $table_name SET nominated=\"yes\", accepted=\"$SACaccepted\" WHERE numkey=\"$FLName\"" ;

	//execute SQL query and get result
	$result = @mysql_query($query, $connection) or die ("Couldn't execute query. <p>$query</p>");
		
	echo "
  <HTML>
  <HEAD>
  <TITLE>Staff Advisory Committee Nomination Acceptance Form</TITLE>
  </HEAD>
  <BODY>
  <center>
  <H1>Staff Advisory Committee Nomination Acceptance Form</H1>
	<p>Your response has be entered into the database.</p>
  <p></p> 
  <p>Thank you for responding.</p>
  </center>
  </BODY>
  </HTML>
  ";
?>
