<?php

session_start(); 
	

	if(!isset($_SESSION['linkarisesuloginsesion']))
	{
		header('Location: index.php');
		return;
	}
	
	include("connect.php");
	
	
	date_default_timezone_set("Asia/Singapore");
	$mdate1= date('Y-m-d H:i:s');
	$mdate2= date('d-m-Y');
	$umid=$_SESSION['linkarisesumid'];
	
	
	$trolleymid=$_POST['trolleymid'];

	$trolleyweight=$_POST['trolleytareweight'];
	$color=$_POST['trolleycolor'];
	
	 $eve = "update res_trolley_master set trolleytareweight='$trolleyweight',trolleycolor='$color',trolleyupdatedby='$umid',trolleyupdatedon='$mdate1' where trolleymid=$trolleymid";
	
	
	if ($conn->query($eve) === TRUE)
	{
			
		$_SESSION['msg'] = "Record has been updated successfully";	
	}
	else
	{
		$_SESSION['msg1'] = "Error";
	}
	header('Location: trolley.php');
?>