<?php
require_once "includes/config.php";
require_once "includes/functions.php";
require_login();

$id  = (int)($_POST['id'] ?? 0);
$qty = (int)($_POST['qty'] ?? 1);

if ($id > 0 && $qty > 0) {
  $_SESSION['cart'][$id] = $qty;
}

header("Location: /myukstore/cart.php");
exit;
