| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/simded.com/favorite/ |
Upload File : |
<?php
include('../include/class.php');
$id_number = $_POST;
/*
echo "<pre>";
print_r($id_number);
echo "</pre>";
*/
for ($i=0; $i < count($id_number['chk']); $i++) {
$list_s = array('table'=>'favorites','where'=>'id = "'.$id_number['chk'][$i].'"');
$view_s = $view_db->view($list_s);
$row_s = $view_db->q($view_s);
$list_p = array('table'=>'phonenumber','where'=>'id = "'.$row_s['phonenumber_id'].'"');
$view_p = $view_db->view($list_p);
$row_p = $view_db->q($view_p);
$_SESSION["cart"][] = $row_p['id'];
$_SESSION["cart"] = array_unique($_SESSION["cart"]);
$_SESSION["num_cart"] = count($_SESSION["cart"]);
}
header("Location: index.php");
/*
echo $_SESSION["num_cart"] = count($_SESSION["cart"]);
*/
?>