Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. // ověření vybraného věku
  2. if (isset($_GET['age']) && isValidAge($_GET['age'])) {
  3.     $age = $_GET['age'];
  4. } else {
  5.     $age = ACTUAL_AGE;
  6. }
  7.  
  8. function isValidAge($age) {
  9.     if (is_numeric($age) && $age >= ACTUAL_AGE) {
  10.         return true;
  11.     }
  12.     return false;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement