Guest User

Untitled

a guest
Apr 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5.  
  6. if($_GET['num1_dive'] > 0  and $_GET['num1_time'] > 0  and $_GET['num1_take'] > 0 and $_GET['num1_add'] > 0 )
  7. {
  8. $num1_add = $_GET['num1_add'];
  9. $num2_add = $_GET['num2_add'];
  10. $total1 = $num1_add + $num2_add;
  11.  
  12. $num1_take = $_GET['num1_take'];
  13. $num2_take = $_GET['num2_take'];
  14. $total2 = $num1_take - $num2_take;
  15.  
  16. $num1_time = $_GET['num1_time'];
  17. $num2_time = $_GET['num2_time'];
  18. $total3 = $num1_time * $num2_time;
  19.  
  20. $num1_dive = $_GET['num1_dive'];
  21. $num2_dive = $_GET['num2_dive'];
  22. $total4 = $num1_dive / $num2_dive;
  23. echo "1.) $total1 <br>";
  24. echo "2.) $total2 <br>";
  25. echo "3.) $total3 <br>";
  26. echo "4.) $total4 <br>";
  27. echo '<a href="index.html">click here to go back</a>';
  28.  
  29.  
  30. }
  31. else
  32. {
  33.  
  34. echo "You did not enter a vaild value<br>";
  35. echo '<a href="index.html">click here to go back</a>';
  36. }
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. ?>
Add Comment
Please, Sign In to add comment