So I have a form that accepts some input from a user that may at a later time be represented on the page.
The way I'm thinking of doing this from a security point of view is to take the input, apply the mysql_real_escape_string() function to all input, then insert using a prepared statement.
When retrieving the data, I'll do a htmlspecialchars() on it before presenting it on screen.
Will this be ok? Am I overlooking something important?