Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z funkcją
tdr
post
Post #1





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 2.02.2013

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


Cześć!
Zacznijmy od tego, że się uczę (IMG:style_emoticons/default/wink.gif)
Teraz, staram się stworzyć formularz rejestracyjny do strony i cały czas mi podświetla mi błąd w 25 linijce... Nie wiem o co chodzi, więc czy możecie zerknąć?
  1. <?php
  2. require_once("config.php");
  3.  
  4. $dbc = mysqli_connect(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME)
  5. or die('Wystąpiły problemy z połączeniem do bazy danych');
  6.  
  7. /* ------------------------------
  8.   Pobieramy wartości formularza
  9.   ------------------------------ */
  10.  
  11. $user_username = mysqli_real_escape_string($dbc, trim($_POST['username']));
  12. $user_password1 = mysqli_real_escape_string($dbc, trim($_POST['password1']));
  13. $user_password2 = mysqli_real_escape_string($dbc, trim($_POST['password2']));
  14. $user_email1 = mysqli_real_escape_string($dbc, trim($_POST['email1']));
  15. $user_email2 = mysqli_real_escape_string($dbc, trim($_POST['email2']));
  16. $user_regulamin = $_POST['regulamin'];
  17. $user_subskrybcja = $_POST['subskrybcja'];
  18.  
  19. function pustePole($pole){
  20. if (empty($pole)){
  21. echo '<p class="error">Nie wypełniłeś/łaś wszystkich wymaganych pól.</p>';
  22. }
  23. }
  24.  
  25. function pustePole($user_username);
  26.  
  27. ?>
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: 20.12.2025 - 18:28