<?php require "_header.php";

$student_inquiry_id = $_REQUEST['student_inquiry_id'];
if(isset($_POST['submit']))
{
$user_id = $_POST['user_id'];
$remark = $_POST['remark'];	


$sql = "update cms_studentmasterinquiry set user_id='".$user_id."',
										remark='".$remark."'
										where student_inquiry_id= $student_inquiry_id";
dbQuery($sql);
header("Location:view_inquiry_form.php");

}


$qry = "select si.* from cms_studentmasterinquiry si where 1 = 1 and
										si.student_inquiry_id = '$student_inquiry_id'";
//echo $qry;										
	$res=dbQuery($qry);
	$row1=dbArray($res);


?>


<!DOCTYPE html>
<html>

<style type="text/css">
.abc {
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

input[type=submit] {
  width: 100%;
  background-color: #4CAF50;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: #45a049;
}

.xyz{
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
}
</style>

<body>

<h3>Forward Inquiry Form</h3>

<div class="xyz">
  <form role="form" method="POST" enctype="multipart/form-data">
    <label for="fname">Student Name</label>
    <input class="abc" type="text" id="fname" name="fname" disabled=disabled value="<?php echo $row1['student_surname'].' '.$row1['student_firstname'].' '.$row1['student_lastname'];?>">

    <label for="forward">Forward</label>
   <select class="abc" name="user_id" id="user_id">
 <option value="-1">Forward To</option>
	<?php
	$sql="select * from cms_usermaster";
	$res=dbQuery($sql);
	while($row=dbArray($res))
	{
	?>
	<option value="<?php echo $row['user_id']?>"><?php echo $row['user_name']?></option>
	<?php 
	} 
	?>

	</select>


    <label for="remark">Remark</label>
    <input type="text" class="abc" id="remark" name="remark" placeholder="Remark..">


  
    <input type="submit" value="Submit" name="submit">
  </form>
</div>

</body>
</html>
<?php 
	require "_footer.php";
?>
