I'm trying to make a feature on a site where users can input large blocks of text which will then appear on the site in a designated location. However, I want them to have the option of pasting in HTML code.
My INSERT queries work fine when I use regular text, but when I use HTML, including quotation marks and slashes, the INSERT query fails. The Column Type is "text", which supports up to around 216 characters (65,000) or so and I'm only entering about 6,000 characters.
However, if I put in plain text via an INSERT query, then run an UPDATE query with the 6,000 HTML characters, I don't encounter any errors, and the row now successfully contains the HTML.
Is there any reason why this is happenning? Is there some PHP function I should run on my data before trying to INSERT the HTML? Thanks
-Aaron