How to store data which contains quotes in MySQL

后端 未结 5 1079
心在旅途
心在旅途 2021-01-21 05:45

In one of my forms I use the rich text editor from Yahoo!. Now i want to store the data from that textarea in a MySQL database.

The user can enter anything in that texta

5条回答
  •  花落未央
    2021-01-21 06:42

    Thanks you guys,
    for your replay.
    But i had only replace the quotes characters...by this..

    html = html.replace(/\'/g, "'"); // 39 is ascii of single quotes
    html = html.replace(/\"/g, """); // 39 is ascii of double quotes
    

    and then stored in the database.
    its working great..by this way... and when i want that data then i just replace to its orginal.

    But thanks for your replay..


    Nitish.
    Panchjanya Corporation

提交回复
热议问题