Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][smarty] rejestracja
inside002
post
Post #1





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 11.02.2011

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


Witam, mam problem ze skryptem rejestracji. Stronę piszę w oparciu o szablony smarty (IMG:style_emoticons/default/wink.gif)

a więc tak gdy wysyłam formularz rejestracyjny nic się nie dzieje a powinien wyskoczyć napis "działa"

Dodam że plik register.tpl jest ładowany za pomocą include po przez zmienną get i jest to podstrona ładowana do indexu.

register.php
  1. <?php
  2.  
  3. if (isset($_POST['login']))
  4. {
  5.  
  6. $test = 'Działa';
  7. $smarty->assign('test', $test);
  8. }
  9.  
  10. ?>

oraz tpl
  1. <form method="POST" action="">
  2. <input type="text" name="login">
  3. <input style="border-style: solid;border-color: #b80505;background-color: #e4e3e3;" name="reg" type="submit" value="Zarejestruj" />
  4. </form>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
inside002
post
Post #2





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 11.02.2011

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


cały czas mam to w kodzie tylko było niżej i nie zaznaczyło się mój błąd (IMG:style_emoticons/default/smile.gif)
register.php
  1. <?php
  2.  
  3. if (isset($_POST['login']))
  4. {
  5.  
  6. $test = 'dziala';
  7. $smarty->assign('test', $test);
  8. }
  9.  
  10. ?>

tpl
  1. <form method="POST" action="">
  2. <input type="text" name="login">
  3. <input style="border-style: solid;border-color: #b80505;background-color: #e4e3e3;" name="reg" type="submit" value="Zarejestruj" />
  4. </form>
  5. {$test}


Teraz mi wyświetla gratulacje po wysłaniu formularza bez względu na to czy pole jest puste czy nie
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 7.10.2025 - 04:39