<?php 
require_once("config/configDB.php"); 
require "userPermission.php";

?>
<!DOCTYPE html>
<html>
<head>
    <title>Vehicle Master</title>
    <?php require 'header.php' ?>
    

</head>
<body>
    <?php 
require 'menu.php';

$id  =  $_GET['id'];

$sql = mysqli_query($conn,"SELECT * FROM vehicle_master WHERE id='".$id."' and flag=1 ");
 
$row=mysqli_fetch_array($sql,MYSQLI_ASSOC);

$vehicle   = $row['vehicle'];

?>
<div class="container-fluid">
    <form class="form-horizontal" action="vehicleMasterUpdate.php" method="post">
    <div class="form-group">
      <label class="control-label col-sm-2" for="email">Edit Vehicle</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="Enter vehicle Name"  value ="<?php echo $vehicle; ?>" name="vehicle">
        <input type="hidden" value='<?php echo $id; ?>' name="edit_id">

      </div>
      
    </div>
    <div class="form-group">        
      <div class="col-sm-12 text-center">
        <button type="submit" class="btn btn-default">Update</button>
      </div>
    </div>
  </form>   
</div>

</body>
</html>