RE: [PHP] text input truncated
| From: | Pablo Gosse | Date: | Tue, 04 Nov 2003 23:31:30 +0000 |
| Subject: | RE: [PHP] text input truncated | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168522@lists.php.net to get a copy of this message | ||
On Tuesday, November 04, 2003 3:28 PM Jay wrote:
> echo "<form><input type=test size=25 value=$xyz></form>";
[snip]
> The text box shows up with "Hello" NOT "Hello World". How do I get the
> entire variable?
Hi Jay.
You need to wrap the value attribute in quotes, or else it'll truncate
at the first space.
echo "<form><input type=text size=25 value=\"$xyz\"></form>";
Oh, and you'd also misspelled the type value text as test (which
incidentally shows up as a text input anyways, since that's the default.
Cheers,
Pablo