PHP: How do I unescape user input from $_POST?
<p>I have a PHP page receiving input from an HTML form via $_POST. The strings in $_POST have quotes and backslashes escaped with '\'. I don't know what else it will escape/encode. I'd like to have exactly what the user typed (as UTF-8 ideally) and I'm sure there's some simple function to do this, but I'm not sure which is the right one.</p>

<p>I know I have to be careful with this when I insert it into a database, or return it in the middle of some HTML, but in my code I'd like to have my hands on exactly what the user typed.</p>

<p>EDIT: magic_quotes_gpc was escaping some things, but even after removing that I still get HTML entities like &amp;#260; from $_POST. Is there a simple way to decode $_POST back to the original user input (preferably in UTF-8)?</p>
