Server IP : 103.53.40.154 / Your IP : 3.15.17.60 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/rajwadahouse.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); require_once('admin/config.php'); // Add to Wishlist start if(isset($_POST["submit_wish"])){ $user_id = $_POST['user_id']; $pro_id = $_POST['product_id']; date_default_timezone_set('Asia/Kolkata'); $currentDateTime = date('Y-m-d H:i:s'); $sql_check = "SELECT * FROM `tbl_wishlist` WHERE `user_id`= '$user_id' AND `product_id` = '$pro_id'"; $run_check = mysqli_query($db,$sql_check); $rows_check = mysqli_num_rows($run_check); if($rows_check){ echo "<script> window.alert('Product Already added to your wishlist'); history.go(-1); </script>"; }else{ $sql_wish = "INSERT INTO `tbl_wishlist`(`user_id`,`product_id`,`added_on`) VALUES('$user_id','$pro_id','$currentDateTime')"; $run_wish = mysqli_query($db,$sql_wish); if($run_wish){ echo "<script> window.alert('Product added to your wishlist'); history.go(-1); </script>"; }else{ echo "<script> window.alert('Error while adding the product to your wishlist.'); history.go(-1); </script>"; } } } // Add to Wishlist end ?>