Wednesday, 15 April 2015

mysql - Query within php isn't working -


I do not have much experience with php and mysql. This plan was to create a text box, whatever you want within this text box Can write. And then the text within the text box will be updated in the database.

It says that the mistake is within this line:

  $ sql = "updated member SET tekst = '$ _ POST [' chat ']' WHERE id = '$ _ Session [' id ']' ";  

This line is within the next code:

   

Thank you in advance,

Gyon

< Do not use P> mysql_query, but try this:

  $ chat = mysql_real_escape_string ($ _ POST ['chat']); $ Id = $ _SESSION ['id']; $ Sql ​​= "Update members SET tekst = '$ chat' WHERE id = '$ id'";  

No comments:

Post a Comment