Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] Zmiena + strtolower, Jak to połączyć ?
Snap
post 24.03.2007, 10:46:51
Post #1





Grupa: Zarejestrowani
Postów: 75
Pomógł: 4
Dołączył: 29.05.2005

Ostrzeżenie: (0%)
-----


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. ?>


Ten post edytował Snap 24.03.2007, 10:47:19
Go to the top of the page
+Quote Post
JaRoPHP
post 24.03.2007, 11:34:32
Post #2





Grupa: Zarejestrowani
Postów: 675
Pomógł: 15
Dołączył: 7.11.2004
Skąd: Katowice

Ostrzeżenie: (0%)
-----


  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?


--------------------
Kto pyta, nie błądzi...
Kto zbłądził, ten pyta...
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 05:53