Advertisement
Guest User

Untitled

a guest
Aug 1st, 2012
1,899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. <?php
  2. $step = $_GET["s"];
  3. $sku = $_GET["b"];
  4. $u = $_GET["u"];
  5. $orderid = $_GET["orderid"];
  6. $bottle = substr($sku,1,1);
  7. if ($step == "0") {
  8.     $random = mt_rand(1, 2);
  9.     switch(TRUE) {
  10.         case ($random >= 1 and $random <= 1):header('Location: https://www.awebsite.com/a-page1.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);break;
  11.         case ($random >= 2 and $random <= 2):header('Location: https://www.awebsite.com/a-page2.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);break;
  12.     }
  13. }
  14. elseif ($step == "1") {
  15.     if ($bottle == "1"){
  16.         header('Location: https://www.awebsite.com/page-1.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  17.     }
  18.     elseif ($bottle == "3"){
  19.         header('Location: https://www.awebsite.com/page-3.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  20.     }
  21.     elseif ($bottle == "5"){
  22.         header('Location: https://www.awebsite.com/page-5.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  23.     }
  24.     elseif ($bottle == "7"){
  25.         header('Location: http://www.awebsite.com/thanks.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  26.     }
  27. }
  28. elseif ($step == "2") {
  29.     header('Location: http://www.awebsite.com/thanks.php?b='.$sku.'&u='.$u.'&orderid='.$orderid);
  30. }
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement