Silly Question
| From: | Gareth Davies | Date: | Mon, 08 Jan 2001 17:09:19 +0000 |
| Subject: | Silly Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-33261@lists.php.net to get a copy of this message | ||
Hi folks,
It's been a really long day and my head's turned to mush on a simple issue. I'm
creating an entry/edit form (i.e. input type=text) and want the user to be able to include both
apostrophes (') and quotes (") in their entered text without a problem. Problem is when I
try to place the entered value into the input field for editing using the apostrophe or quote -
value='$from_db' (so as to allow the user the ability to use spaces in their entry).
Whichever deliminator I use prohibits the use of that character for obvious reasons. I have tried
using the wierd apostrophe to the left of the 1 key (`), but that doesn't work with Netscape
unfortunately. I've also tried various string functions like addslashes/stripslashes,
htmlspecialchars, etc. but none of them are giving me what I want.
I'm sure there's a really simple answer to this, but can't think what it is.
Thanks in anticipation, guys.
Gareth Davies
Progressive Business Services Ltd
+44 (0) 1274 889592 Office
+44 (0) 1274 889656 Fax
+44 (0) 7970 733851 Mobile (24 Hour)