Advertisement
DeagleM

Untitled

Nov 14th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['produkt'])&&isset($_POST['ilosc'])){
  3. if($_POST['ilosc']!=NULL){
  4. if(!isset($_COOKIE[$_POST['produkt']])){
  5. setcookie($_POST['produkt'],$_POST['ilosc'],time()+300);
  6. header("Location: index.php");
  7. }else{
  8. $ilosc=$_POST['ilosc']+$_COOKIE[$_POST['produkt']];
  9. setcookie($_POST['produkt'],$ilosc,time()+300);
  10. header("Location: index.php");
  11. }
  12. }else{
  13. header("Location: index.php");
  14. }
  15. }else{
  16. header("Location: index.php");
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement