<?php
  include "include/dbcon.php";
  include "include/CORDER.php";
?>
<?php
  $pid = $_POST["pid"];
  $pqtty = $_POST["pQtty"];
  $myCart = new CART();
  $arrCart = $myCart->getCarts();
  if( count($arrCart)>0 ){
      $ptimestamp = $myCart->getTimestamp();
  }else{
      $ptimestamp = time();
  }
  $myCart->addCart($ptimestamp,$pid,$pqtty);
?>
<?php
  header("location: main.php")
?>;