Good day!

There was such a problem, php does not add the '+' (plus) sign to the database. There are no mistakes, the sign just cuts off. Team standard:

mysql_query('INSERT INTO table (text) VALUE (myvar)'); 

Tried to add without preliminary filtering with the htmlspecialchars() function the result is the same. Tell me how to fix this problem!

    2 answers 2

     mysql_query('INSERT INTO table (`text`) VALUE ('myvar') 

    Just due to the fact that you are not shielding - the summation is empty.

    • And do not tell me why in the update query the same result of cutting the plus, although here I escaped variables. Here is the detailed code: $ queryUpdatePost = mysql_query ("UPDATE news SET cat = '$ cat', text = '$ text', title = '$ title' WHERE id = '". $ _POST [' id ']. "" " ); - taiysan

    I think either htmlspecialchars should be processed and screened, or you already use a function that removes all extraneous characters during processing.