Jump to content

Escaping Quotes


niche

Recommended Posts

When I escape an apostrophe in a <textarea>, in a <form>, "Joe\'s coat." get's saved as "Joe's coat." in the table, but it displays correctly on my browser as "Joe's coat.". It seems the escaping is only important for the mysql UPDATE query. If so, how do I avoid, having to manually re-enter the escaping, each time I need to UPDATE a column with text that has apostrophes in a <form>?

Link to comment
Share on other sites

mysql_real_escape_string()? I mean, that is after all its purpose - to take any code, and add slashes to any characters that are needed for the string to be treated as a single string (as opposed to part of a query).

Link to comment
Share on other sites

I'm not doing that manually anymore! I may frequently get the lessons out of order, but I do get them. Thanks for your help boen_robot and justsomeguy

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...