<?php
include_once('../../../db_connect/db.php');
	$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="INSERT INTO schools(title,code,description,email,location,phone_contacts)
					VALUES('$title','$code','$description','$email','$location','$pn')";

	$sql_insert=mysqli_query($con,$insert);
	if($sql_insert){

		echo 1;

	}else{
		echo $error='<div class="alert alert-success alert-dismissible" role="alert">
			 <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			 <strong>Aert!</strong> School not saved sucessfully.
			</div>';
	}

?>