Estoy viendo que capaz que sea porque las noticias que trato de actualizar tienen caracteres extraños como " , \ / , y eso. Estoy tratando de agregarle las barras con lo siguiente:
Código PHP:
Ver original$title= $_POST["title"];
$article= $_POST["article"];
Pero me tira el siguiente error :
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 66
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 66
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 67
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 67
Se modifico la noticia exitosamente
UPDATE news SET title= '' , article = '' WHERE newID= 10 (Esto es la variable $query cuando trato de escapar de los caracteres extraños)
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 66
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 66
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a1968458/public_html/editDelete.php on line 67
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/a1968458/public_html/editDelete.php on line 67
No se pudieron agregar los valores a la base de datos You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Ademas me llama la atencion los errores ya que tengo exactamente el mismo codigo al momento de agregar la noticia por lo que deberia funcionar bien pero no..