<?php include("../cn.php");
$id = $_REQUEST["id"];
$driver = $_REQUEST["driver_id"];
mysqli_query($connect, "DELETE FROM `rentedcars` where Id='$id'");

if($driver == NULL){
}
else{
$driver = $_REQUEST["driver_id"];
$query = "UPDATE driver SET driver_availability = 'yes' WHERE driver_id = $driver";
$result1 = mysqli_query($connect, $query);
}
?>
<?php
header("location:../booking.php");

?>