I'm stumbling over how to allow people to put single or double quotes
in a form text field.
I am passing the form to itself ($PHP_SELF) and on the second time
through previewing what the form data will look like and also
re-creating the form with the data already filled in.
Here's an example
See: http://www.php.net/manual/en/function.htmlspecialchars.php
John Hughes wrote:
I'm stumbling over how to allow people to put single or double quotes
in a form text field.
I am passing the form to itself ($PHP_SELF) and on the second time
through previewing what the form data will
Yeah, you have to convert the single and double quotes to html entities so
they are not mistaken for the end of the string.
If you look at your source code, you'll see why it's happening.
value = 'O'Bryan'
value = Joe Bruiser Smith
You can see how the 'O' is taken as the string, and the rest
3 matches
Mail list logo