Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Syntax error....
Forum PHP.pl > Forum > PHP
tiraeth
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...
hwao
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
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.