Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Syntax error...., o so chozi?
tiraeth
post 15.05.2005, 17:30:17
Post #1





Grupa: Przyjaciele php.pl
Postów: 1 789
Pomógł: 41
Dołączył: 30.10.2003
Skąd: Wrocław

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


Witam... mam sobie kod:

  1. <?php
  2. # .. rach-ciach ..
  3.  
  4.          $username = htmlentities($_POST['username']);
  5.          $password = $_POST['password'];
  6.          $data = mktime(0,0,0,$_POST['birth_month'],$_POST['birth_day'],$_POST['birth_year']);
  7.          $website = $_POST['website'];
  8.  
  9.          $avatar = ($_POST['avatar'] != 'http://') ? $_POST['avatar'] : '';
  10.  
  11.          $email = $_POST['email'];
  12.          $gadugadu = $_POST['gadugadu'];
  13.  
  14.          $show_birthday = ($_POST['showbirthday']) ? '0' : '1';
  15.          $show_email = ($_POST['showemail']) ? '0' : '1';
  16.          $show_gadugadu = ($_POST['showgg']) ? '0' : '1';
  17.          $show_website = ($_POST['showwebsite']) ? '0' : '1';
  18.          $allow_pw = ($_POST['allow_pw']) ? '1' : '0';
  19.  
  20.          $sql = mysql_query(&#092;"INSERT INTO \".PREFIX.\"users (username, user_password, user_email, user_showemail, user_allowpw, user_gad
    u
  21. adu, user_showgg, user_birthday, user_website, user_showwebsite, user_regdate, u
  22. er_avatar)VALUES('\".$username.\"','\".md5($password).\"','\".$email.\"',\".$show_email.\",\".$allow_pw.\",\".$gadugadu.\",\".$show_gadugadu.\",\".$data.\",'\".$website.\"',\".$show_website.\",\".time().\",'\".$avatar.\"')\")
  23.                     or die(mysql_error());
  24.  
  25. # .. rach-ciach ..
  26. ?>

Niestety nie wiem co w mysql_query jest źle... wywala mi:
Kod
Something is wrong in your syntax obok '0,1136847600,'http://google.pl' 0,1116174492,'http://moj_avatar' w linii 1


pomocy...

Ten post edytował volture 15.05.2005, 17:32:26
Go to the top of the page
+Quote Post
hwao
post 15.05.2005, 17:57:14
Post #2


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




Kod
Something is wrong in your syntax obok '0,1136847600,'http://google.pl' 0,1116174492,'http://moj_avatar' w linii 1

Braknie , miedyz google a liczba.

Pozatym w mysql roznie daje sie te strini i inty raz " ' albo calkowicie bez:) pokmin z zamiana winksmiley.jpg
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: 16.06.2025 - 21:23