Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z INSERT
Wieczny
post
Post #1





Grupa: Zarejestrowani
Postów: 191
Pomógł: 1
Dołączył: 21.03.2007

Ostrzeżenie: (60%)
XXX--


Nie dodaje nowego rekordu ;(
  1. <?php
  2. include('cfg.php');
  3. if($_POST['creat'] == 1 )
  4. {
  5.  
  6.  
  7. $login = addslashes($_POST['login']);
  8. $pw = addslashes($_POST['password']);
  9. $email = addslashes($_POST['email']);
  10.  
  11.  
  12.  $query = ("INSERT INTO user (id, login, pw, email, date) 
  13. VALUES ('', '".$_POST['login']."', '".$_POST['password']."', '".$_POST['email']."', '')");
  14.  
  15. echo "DODANE !";
  16.  
  17.  }
  18.  
  19.  
  20.  
  21. echo "
  22.  <link rel='Stylesheet' type='text/css' href='style.css'>
  23.  ( Znaki specjalne tkj. $/^&$#@!&*() nie dzialają )
  24.  <form action='register.php' method=POST>
  25.  <input class='input' type='text' name='login' maxlength='12'> - Nazwa użytkownika <br /> <br />
  26.  <input class='input' type='password' name='password' maxlength='8'> - Haslo <br /> <br />
  27.  <input class='input' type='text' name='email'> - Adres email <br /> <br />
  28.  <input class='input' type='submit' value='Rejestruj'>
  29.  <input type='hidden' name='creat' value='1'>
  30.  </form>
  31.  ";
  32.  
  33.  
  34. ?>
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: 22.08.2025 - 21:57