[EMAIL PROTECTED] wrote:
I have an application which calls up some data from a MySQL table and
puts it into a web form for users to modify.
One of the cells holds a text string which is put into a text input
field. However, if that text string includes an apostrophe, all text
after the apostroph
> I have an application which calls up some data from a MySQL table and
> puts it into a web form for users to modify.
>
> One of the cells holds a text string which is put into a text input
> field. However, if that text string includes an apostrophe, all text
> after the apostrophe disappears.
>
Jeffry,
I suggest use htmlentities/html_entity_decode functions. For example to
update the db with values use:
$myCol = htmlentities($mycol_value);
Ej: query
$query = "update my_table set myCol='{$myCol}' where id = 'id_val'";
Now when your application restore the data from the db you can use:
You could try enclosing the string in the HTML line by double-quotes rather
than single quotes.
Ie.
Regards,
Richie !
_
From: Jeffrey [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 April 2006 11:56 pm
To: PHP DB
Subject: [PHP-DB] short text strings with apostrophes and forms
Hi Jeffrey,
try this:
>>>
print "value='".htmlspecialchars($some_text)."'>\n";
<<<
Regards,
- Charlie
On 20 Apr 2006, at 17:56, Jeffrey wrote:
I have an application which calls up some data from a MySQL table
and puts it into a web form for users to modify.
One of the cells holds a text stri
I have an application which calls up some data from a MySQL table and
puts it into a web form for users to modify.
One of the cells holds a text string which is put into a text input
field. However, if that text string includes an apostrophe, all text
after the apostrophe disappears.
For exa