Guest User

Untitled

a guest
May 20th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function myfunc($input,$page="overnatning.php") {
  2. $age1 = 18;
  3. $age2 = 30;
  4. $age3 = 45;
  5. $age4 = 60;
  6. $side = 1;
  7. if($input >= $age1 && $input < $age2)
  8. {
  9. $side=1;
  10. }
  11. if($input >= $age2 && $input < $age3)
  12. {
  13. $side=2;
  14. }
  15. if($input >= $age3 && $input < $age4)
  16. {
  17. $side=3;
  18. }
  19. if($input >= $age4)
  20. {
  21. $side=4;
  22. }
  23. header("Location: ".$page."?side=".$side);
  24. }
  25.  
  26. myfunc($_POST['alder']);
  27.  
  28. myfunc($_POST['alder'],"otherpage.php");
Add Comment
Please, Sign In to add comment