Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP] Zmiena + strtolower
Forum PHP.pl > Forum > Przedszkole
Snap
Witam.
Mam taki skrypt i chciałem tu dorzucić jeszcze funkcje strtolower dla zmiennej $key. proszę o pomoc.

  1. <?php
  2. function from_post($key, $maxlength, $restrict)
  3. {
  4. $result = $_POST[$key];
  5. if (!is_correct_string($result, $maxlength)) return "";
  6. if ($restrict and (only_letters_and_numbers($result, $maxlength) == 0)) return "";
  7. return $result;
  8. }
  9. ?>
JaRoPHP
  1. <?php
  2. function from_post($key, $maxlength, $restrict) {
  3.  $result = strtolower($_POST[$key]);
  4.  if (!is_correct_string($result, $maxlength)) {
  5. return "";
  6.  }
  7.  if ($restrict and (only_letters_and_numbers($result, $maxlength) == 0)) {
  8. return "";
  9.  }
  10.  return $result;
  11. }
  12. ?>


O to chodzi?
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.