<?php
if(isset($_POST['token'])){
		
		include_once('../../../db_connect/db.php');
		$school_id = $_POST["token"];
		
		$sqlmg=mysqli_query($con, "select * from schools where  school_id='$school_id' ") or die(mysqli_error());
										
									
									if($sqlmg){
										$sqlmg_row=mysqli_num_rows($sqlmg);
											if($sqlmg_row >0){
												
												while($row=mysqli_fetch_assoc($sqlmg)){				
													
													$school_id=$row['school_id'];
													$title=$row['title'];
													$code=$row['code'];
													$email=$row['email'];
													$phone_contacts=$row['phone_contacts'];
													$location=$row['location'];
													$description=$row['description'];
													$date_added=$row['date_added'];
													$school_status=$row['school_status'];
													
													
													
												}
											}
									}
		
		
		
}



?>
<form method="POST" id="edit_form_school" >
				<input id="school_id" name="school_id" type="hidden" class="form-control required" value="<?=$school_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="title" 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="email"
						placeholder="email" value="<?=$email;?>" class="form-control required" />
					</div>
             </div>
			 
			 
			 <div class="form-group row">
				<label for="location" class="col-sm-3 col-form-label text-right">Location 
				</label>
					<div class="col-sm-9">
						<input id="text" name="location" type="text"
						placeholder="Location " value="<?=$location;?>" class="form-control required"  />
					</div>
             </div>

			 <div class="form-group row">
				<label for="Phone Number" class="col-sm-3 col-form-label text-right">Phone Number 
				</label>
					<div class="col-sm-9">
						<input id="text" name="pn" type="text"
						placeholder="Phone Number " value="<?=$phone_contacts;?>" class="form-control required"  />
					</div>
             </div>
							<div class="form-group row">
												<label class="col-sm-3 col-form-label text-right"> Description</label>
									<div class="col-sm-9">
										<textarea class="form-control" rows="2" name="description" id="comment"><?=$description;?></textarea>
									</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>