<?php
include('../../db_connect/db.php');

//get datas from the form
$title = $_POST['title'];
$site_id = $_POST['site_id'];
$description = $_POST['description'];
$date = $_POST['date_modified'];
$modified_by=$_POST['modified_by'];
$status=$_POST['status'];


            //update into the database
            $insert= mysqli_query($conn_1, "UPDATE hostel_campuses SET
              title = '$title',
              description = '$description',
              published = '$status',
              date_modified = NOW(),
              modified_by = '$modified_by'
               WHERE id = '$site_id'");
            if($insert){
               $status='Edited successfully.';
             }else{
               $status='Something went wrong, contact developer.';
             }

echo $status;
?>
