I’m already using http://php.net/pdo so I can get whatever I want from the user input, I store it in a safe way in my database.
Now I want to display what I have in my database into a Web page. How can I construct a Web page a be sure that there can be no JavaScript or whatever that will be executed when the page is displayed?
Sorry I’m very tired, I’ve been working for 12 hours now, if someone can correct the mistakes I’ve done when posting my question…
Thank you very much.
htmlentities(stripslashes($stmt_result->data), ENT_QUOTES, 'UTF-8');htmlentities() will encode chars like > to
>and stripslashes() will delete backslashes from escaped string.