I'm running into a strange problem -
In a scenario when I'm selecting data from the db to be used in an <input>, such as:
<input type='text' name='Data' value='$data'>
If the $data has single or double quotes, the string gets cut off because the browser reads it as the closing quotes for the value. If I remove the quotes, then anything separated by a space is lost.
I tried various incarnations of htmlspecialchars, addslashes, etc., but none of them seem equipped to handle a text input with single and double quotes, such as if I was inputting a height of 6'1".
Any ideas how to handle this?
Thanks,
Steve