You could try enclosing the string in the HTML line by double-quotes rather
than single quotes.
Ie. <input type="text" name="some_variable" value="$some_text">
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
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 example, if the test string from a database cell reads...
Fix the managers' cars by Tuesday
and that is saved in the variable $some_text, which is called up in a
<input type='text' name='some_variable' value='$some_text'>
The text field on the web page will only contain...
Fix the managers
How can I get the text field to show the entire string?
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
avast! Antivirus <http://www.avast.com> : Inbound message clean.
Virus Database (VPS): 0616-3, 20/04/2006
Tested on: 21/04/2006 12:03:14 am
avast! - copyright (c) 1988-2005 ALWIL Software.