Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_GET['add_cart'])){
- global $db;
- $ip = getIp();
- $pro_id = $_GET['add_cart'];
- $check_pro = "select * from card where user_ip='$ip' AND prod_id='$pro_id'";
- $run_check = mysqli_query($db,$check_pro);
- if(mysqli_num_rows($run_check) > 0){
- echo ""; //refresh or do nothing
- }
- else {$insert_pro="insert into card (prod_id,user_ip) values ('$pro_id','$ip')";
- $run_pro= mysqli_query($db,$insert_pro);
- echo"<script> window.open('woodland.php','_self')</script>";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement