fork download
  1. <?php
  2. $user=$_POST["user"];
  3. $gift=$_POST["gift"];
  4. if(($user=="0")||($gift=="0"))
  5. {
  6. echo "Invalid Data";
  7. }
  8. if($user=="1")
  9. {
  10. if($gift=="1")
  11. {
  12. echo "You are eligible for 20% discount";
  13. }
  14. if($gift=="2")
  15. {
  16. echo "You are eligible for 15% discount";
  17. }
  18. }
  19. if($user=="2")
  20. {
  21. if($gift=="1")
  22. {
  23. echo "You are eligible for 20% discount";
  24. }
  25. if($gift=="2")
  26. {
  27. echo "You are not eligible for any discount";
  28. }
  29. }
  30. ?>
Success #stdin #stdout #stderr 0.02s 25952KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined index: user in /home/1AMup0/prog.php on line 2
PHP Notice:  Undefined index: gift in /home/1AMup0/prog.php on line 3