Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PEAR::HTML_QuickForm] Problem z filtrami., problem z funkcja applyFilter.
br-design.pl
post
Post #1





Grupa: Zarejestrowani
Postów: 44
Pomógł: 1
Dołączył: 30.05.2006
Skąd: Gdańsk

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


Witam, mam problem z PEAR::HTML_QuickForm, jeżeli ktoś jest w stanie pomóc, będe wdzięczny:

oto kod:
  1. <?php
  2. // tworze elementy formularza do dodawania nowego usera.
  3. $this->form = new HTML_QuickForm("$this->moduleName");
  4.  
  5. // dodawanie pol.
  6. $this->form->addElement('text', 'user', 'Nazwa usera:', array('size' => 30));
  7. $this->form->addElement('password', 'password', 'Hasło:', array('size' => 30));
  8.  
  9. // dodawanie validacji
  10. $this->form->addRule('user', 'Podaj nazwe usera.', 'required', null, 'client');
  11. $this->form->addRule('password', 'Podaj hasło.', 'required', null, 'client');
  12.  
  13. // DODAJE FILTR.
  14. $this->form->applyFilter('password', 'md5');
  15.  
  16. if($this->form->validate()) {
  17. $this->addRekordFromPost();
  18.  
  19.  // przeladowanie
  20. $this->reloadPage();
  21.  
  22. } else {
  23. $this->form->addElement('submit', null, 'Dodaj');
  24. $this->form->display();
  25. }
  26. ?>


Problem polega na tym, że filtr nie działa, zmienna powinna zostać zakodowana jako MD5, jednak tak się nie dzieje. Pomocy.


--------------------
tworzenie stron Gdańsk
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Przenosze na gotowe skrypty


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

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 Aktualny czas: 19.08.2025 - 12:52