<?php
include_once('../../../db_connect/db.php');
	$school_id=mysqli_real_escape_string($con,$_POST["school_id"]);
	$department_id=mysqli_real_escape_string($con,$_POST["department_id"]);
	$programme_id=mysqli_real_escape_string($con,$_POST["programme_id"]);
	$course_id=mysqli_real_escape_string($con,$_POST["course_id"]);
	$seen_as_elective=mysqli_real_escape_string($con,$_POST["seen_as_elective"]);
	
	$insert="INSERT INTO programmes_courses(school_id,department_id,programme_id,course_id,seen_as_elective)
					VALUES('$school_id','$department_id','$programme_id','$course_id','$seen_as_elective')";

	$sql_insert=mysqli_query($con,$insert) or die(mysqli_error());
	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> Programme Course not saved sucessfully.
			</div>';
	}

?>