<?php 
error_reporting(0);
session_start();

include_once('../../../db_connect/db.php'); 
if(isset($_SESSION['admin_id'])){

	$admin_id = $_SESSION['admin_id'];
}else{
	$admin_id =0;
}
	$school_id=mysqli_real_escape_string($con,$_POST["school_id"]);
	$title=mysqli_real_escape_string($con,$_POST["title"]);
	$code=mysqli_real_escape_string($con,$_POST["code"]);
	$email=mysqli_real_escape_string($con,$_POST["email"]);
	$location=mysqli_real_escape_string($con,$_POST["location"]);
	$pn=mysqli_real_escape_string($con,$_POST["pn"]);
	$description=mysqli_real_escape_string($con,$_POST["description"]);
	
	
	
	
		 $insert = mysqli_query($con,"UPDATE schools SET modified_by='$admin_id',date_modified=now(),title='$title',code='$code',email='$email',location='$location',phone_contacts='$pn',description='$description' WHERE school_id='$school_id'");
                
							if($insert){ 
							
								echo 1; 
								
								
							} else{
								
								echo '<div class="alert alert-danger alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><strong>Alert!</strong> not updated </div>';
							} 
		 
		 
		 
		 
		 
	 

