CasperSecurity
<?php
session_start();
include '../../../../web/connection/connection.php';
$hostel_id = $_REQUEST['hostel_id'];
$hostel_no = $_REQUEST['hostel_no'];
$hostel_name = $_REQUEST['hostel_name'];
$hostel_type = $_REQUEST['hostel_type'];
$no_floors = $_REQUEST['no_floors'];
$no_rooms = $_REQUEST['no_rooms'];
$room_occupancy = $_REQUEST['room_occupancy'];
$modified_on = date("Y-m-d");
$modified_by = $_REQUEST['modified_by'];
$db_handle = new DBController();
$newUpdate = $db_handle->runMyUpdate("UPDATE hostel SET hostel_no = '$hostel_no',hostel_name ='$hostel_name',hostel_type ='$hostel_type',
no_floors ='$no_floors',no_rooms='$no_rooms',room_occupancy='$room_occupancy',modified_on='$modified_on',modified_by='$modified_by' WHERE hostel_id = '$hostel_id'");
if($newUpdate == TRUE){
echo 'Data updated Successfully';
}else{
echo 'Not updated' ;
}
?>