|
Posted by Andy Jeffries on 05/18/06 18:39
On Thu, 18 May 2006 10:20:17 -0500, Terry wrote:
> <input type=\"text\" id=\"grip\"
> name=\"grip\" maxlength=\"60\" size=\"60\" value=\"$row[4]\">
>
> $description will display whatever is entered ' and " $grip will
> truncate anything after the " when the record comes up for modification.
The answer is simple, your content contains a " and the HTML attribute
uses " to contain the value. So effectively you have this:
value="12" racket"
So the value trims after 12 and then has racket" after it.
There are two ways round this:
1) Hacky - use value='$row[4]' which will allow you to use " within the
data
2) Better - use htmlentities on the data before displaying it for editing
using ENT_QUOTES to convert quotes to HTML entities. Browsers will
display the proper character and allow editing as if it's a single
character.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|