<?php 
session_start();
require_once '../../Server/connection.php';
if($_POST){	


  $asset_id  = $_POST['asset_id'];
  $itemType_id  = $_POST['itemType_id'];
  $asset_name  = $_POST['asset_name'];
  $serial_no  = $_POST['serial_no'];
  $value  = $_POST['value'];
  $remarks  = addslashes($_POST['remarks']);
  
  $sql = "UPDATE assets SET itemType_id = '$itemType_id',asset_name = '$asset_name',serial_no='$serial_no',value='$value',remarks='$remarks' WHERE asset_id = {$asset_id}";		

  $result = $conn->query($sql);
  
  if($result){
  
  $_SESSION['success_message'] = "You have successfully Updated Assets";
  header("Location: ../editAsset.php");
  exit();
  
      }
  
  
} 