Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [mysql] update-error ...syntax to use near ''' at line 1
pag-r
post
Post #1





Grupa: Zarejestrowani
Postów: 52
Pomógł: 0
Dołączył: 29.08.2007

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


staram sie znalezc ten niepotrzebny apostrof i poprawiam zapytanie ale wciaz to samo :/
  1. <?php
  2.  if(isset($_POST['submit']) && $_POST['submit'] == "Uaktualnij") {
  3. $query_update= "update user_info set email_ui='". $_POST['email_ui']."',".
  4.  "weight_ui='". $_POST['weight_ui']."',"."height_ui='". $_POST['height_ui']."',".
  5.  "y_birt_ui='". $_POST['y_birt_ui']."'". "where username_ui='".$_SESSION['user_logged'].
  6.  "and passwd_ui=(PASSWORD('".$_SESSION['user_password']."'))";
  7. $result_update=mysql_query($query_update) or die(mysql_error());
  8.  
  9.  $query="select * from user_info where username_ui='" .$_SESSION['user_logged']."'".
  10.  "and passwd_ui=(PASSWORD('". $_SESSION['user_password']."'))";
  11.  $result=mysql_query($query) or die(mysql_error());
  12.  $row=mysql_fetch_array($result);
  13. ?>
  14.  <b>Dane profilu zostały uaktualnione</b><br>
  15. <a href="user_personal.php">Kliknij,</a>aby powrócić do swojego konta.
  16. <form action="update_account.php" method="post">
  17. Adres email:<input type="text" name="email_ui" value="<?php echo $row['email_ui']; ?>"><br>
  18. Waga[kg]:<input type="text" name="weight_ui" value="<?php echo $row['weight_ui']; ?>"><br>
  19. Wzrost[cm]:<input type="text" name="height_ui" value="<?php echo $row['height_ui']; ?>"><br>
  20. Rok urodzenia[RRRR]:<input type="text" name="y_birt_ui" value="<?php echo $row['y_birt_ui']; ?>"><br>
  21. <input type="submit" name="submit" value="Uaktualnij"> &nbsp;
  22. <input type="button" value="Anuluj" onclick="history.go(-1);">
  23. </form>
  24. </p>
  25.  <?php 
  26. } else {
  27. $query="select * from user_info where username_ui='" .$_SESSION['user_logged']."'" .
  28. "and passwd_ui=(PASSWORD('" .$_SESSOION['user_password']."'))'";
  29. $result = mysql_query($query) or die(mysql_error());
  30. $row=mysql_fetch_array($result);
  31.  ?>
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 - 18:55