<?php

if (!session_start()) {
    session_start();
}
try {
    $db = new PDO('mysql:host=localhost;dbname=gdhhsxmy_monsoonvibespublica;charset=utf8', 'gdhhsxmy_monsoonvibespublica', 'monsoonvibespublica');
} catch (Exception $e) {
    echo 'Error has Occured';
}

unset($_SESSION['bookid']);



if (isset($_POST['remove_btn'])) {
    $cid  = $_POST['remove_cid'];
    $id   = $_POST['remove_id'];
    $stmt = $db->prepare("Delete from cart where id=$id AND Cid=$cid ");
    $stmt->execute();
    header('location:cart.php');
    exit();
}
