Displaying field contents in input text box
| From: | Ian Warburton | Date: | Mon, 08 Jan 2001 23:34:04 +0000 |
| Subject: | Displaying field contents in input text box | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-33366@lists.php.net to get a copy of this message | ||
I am new to this list (and PHP programming), I am struggling getting the
contents of a field from a table to display correctly before editing.
problem is that the filed content only displays up to the first space - I
can correct this using
this
$trans = get_html_translation_table(HTML_ENTITIES);
$trans[" "] = " ";
$html = strtr($myrow[1],$trans);
print($html);
... and then in the form
<input type="Text" name="l_name" size="50" value=<?php echo
HTMLSpecialChars($html);?> >
...
this works in the following way -I get the correct output for the first
print statement, the second, for input initial value displays  , i.e.
foo Bar
how can I get this to display the correct full field contents? ie
Foo Bar
Heres Hoping
Ian