The PHP manual and user feedback within all leave me feeling confused. I'm trying to fix someone else's code where he resorted to converting all form data to ASCII codes and back.
This was done as a crude way of escaping everything but is hard to maintain and the database looks like a bunch of comma separated numbers instead of a queryable database. Surely there's a sure-fire way in php to store a form value and retrieve it without so many contortions. The various escape
and unescape
functions don't seem to escape everything.
You also need to check this and set this but make sure something else is not set. What gives? Simply stated, whatever is in the form fields must be reliably written to MySQL columns and be easy to retrieve back into PHP and query in mysql. The form is on the intranet and the data may contain all normal keyboard input including dollar sign, percent sign, slashes and apostrophes.