<?php
if(isset($_POST['token'])){

		include_once('../../../db_connect/db.php');
		$department_id = $_POST["token"];

		$sqlmg=mysqli_query($conn_1, "select * from departments where  department_id='$department_id' ") or die(mysqli_error());


									if($sqlmg){
										$sqlmg_row=mysqli_num_rows($sqlmg);
											if($sqlmg_row >0){

												while($row=mysqli_fetch_assoc($sqlmg)){

													$department_id=$row['department_id'];
													$faculty_id=$row['faculty_id'];
													$title=$row['title'];
													$code=$row['code'];
													$description=$row['description'];
													$real_department=$row['real_department'];
													$email=$row['email'];
													$phone_contacts=$row['phone_contacts'];
													$department_status=$row['department_status'];


												}
											}
									}



}



?>
<form method="POST" id="edit_form_faculty" >

				<input id="department_id" name="department_id" type="hidden" class="form-control required" value="<?=$department_id;?>" required />

				<div class="form-group row">
				<label for="title" class="col-sm-3 col-form-label text-right">Title : (*)
				</label>
					<div class="col-sm-9">
						<input id="title" name="title" type="text"
						placeholder="Title " class="form-control required" value="<?=$title;?>" required />
					</div>
             </div>

			 <div class="form-group row">
				<label for="code" class="col-sm-3 col-form-label text-right">Code : (*)
				</label>
					<div class="col-sm-9">
						<input id="Code" name="code" type="text"
						placeholder="Code " class="form-control required" value="<?=$code;?>" required />
					</div>
             </div>

			 <div class="form-group row">
				<label for="email" class="col-sm-3 col-form-label text-right">Email : (*)
				</label>
					<div class="col-sm-9">
						<input id="email" name="email" type="text"
						placeholder="Email " class="form-control required" value="<?=$email;?>" required />
					</div>
             </div>

			<div class="form-group row">
				<label for="phone_contacts" class="col-sm-3 col-form-label text-right">Phone No : (*)
				</label>
					<div class="col-sm-9">
						<input id="phone_contacts" name="phone_contacts" type="text"
						placeholder="Phone Number " class="form-control required" value="<?=$phone_contacts;?>" required />
					</div>
             </div>



			 <div id="button_edit">
							<center>
														<button class="button button-3d button-primary button-rounded btn_3d" type="submit">Update
												</button>
						</div>
             </form>

			 <center>
				<div id="output_error_edit">

				</div>
			</center>
