I'm having a little bit of trouble making a sticky form that will remember what is entered in it on form submission if the value has double quotes. The problem is that the HTML is supposed to read something like:
<input type="text" name="something" value="Whatever value you entered" />
However, if the phrase: "How do I do this?" is typed in with quotes, the resulting HTML is similar to:
<input type="text" this?="" do="" i="" how="" value="" name="something"/>
How would I have to filter the double quotes? I've tried it with magic quotes on and off, I've used stripslashes and addslashes, but so far I haven't come across the right solution. What's the best way to get around this problem for PHP?