hjkhghopjkertteerterterterertertrtoirh
bnmbertsurhetertertertertertertertpdf'tdfg
/
home
/
easy3158
/
domains
/
ekwiatki.pl
/
public_html
/
Upload FileeE
HOME
<?php ob_start(); session_start(); include("admin/inc/conn.php"); //===================================== $id = trim(addslashes(strip_tags($_GET['id']))); if($id == "all"){ mysqli_query($connect,"DELETE FROM `cart` WHERE `user_hash` = '".$_SESSION['user_hash']."'"); } else { mysqli_query($connect,"DELETE FROM `cart` WHERE `id` = $id AND `user_hash` = '".$_SESSION['user_hash']."'"); //---------------------------------- $qCheckDodatki = mysqli_query($connect,"SELECT * FROM `cart` WHERE `user_hash` = '".$_SESSION['user_hash']."' AND `dodatek` = '1'"); $nCheckDodatki = mysqli_num_rows($qCheckDodatki); if($nCheckDodatki > 0){ //---------------------------------- $qCheckCart = mysqli_query($connect,"SELECT * FROM `cart` WHERE `user_hash` = '".$_SESSION['user_hash']."' AND `dodatek` = '0'"); $nCheckCart = mysqli_num_rows($qCheckCart); if($nCheckCart == 0){ mysqli_query($connect,"DELETE FROM `cart` WHERE `user_hash` = '".$_SESSION['user_hash']."' AND `dodatek` = '1'"); } //---------------------------------- } //---------------------------------- } //===================================== header("Location: cart"); ?>