Hi
I have a form in which i want the user to be able to enter single quotes (mary's chicken's), this is no problem and the form submits as it should.
However, if, on my handing page an error is discovered and i need to redirect the user to the form again, how would i enable the full string of the entered data (mary's chicken's said) to automatically load up in the input box.
PHP Code:
$_SESSION[mary]="mary's chicken's";
<input type='text' value='<?PHP echo $_SESSION[mary];?>' name='mary'>
will output
HTML Code:
<input type='text' value='mary' name='mary'>
I could obviously in this case use double quotes to surround the relevant variables, but then im stuck with the same issue if my user decides to use double quotes.
Is this just a flaw in programming which i have to live with ? Id really like to figure out a way around it.
Thanks in advance, mark
|