Re: Text data truncated after first blank character in form fields
| From: | Kevin Stone | Date: | Mon, 17 Feb 2003 21:44:52 +0000 |
| Subject: | Re: Text data truncated after first blank character in form fields | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-135905@lists.php.net to get a copy of this message | ||
It's your HTML Failing to enclose the value in quotes may lead to
truncation. Your output looks like this...
<input type="text" size=20 name=testvar value=a b c>
You should always quote every parmeter in the tag just to avoid such
problems. This should work..
<input type="text" size="20" name="testvar" value="<?php
echo $testvar;?>">
- Kevin
----- Original Message -----
From: "Michael Eacott" <Michael@eacott.worldonline.co.uk>
To: <php-general@lists.php.net>
Sent: Monday, February 17, 2003 2:04 PM
Subject: [PHP] Text data truncated after first blank character in form
fields
> When I have the following in a form:
> <?php $testvar = "a b c"; ?>
> <input type="text" size=20 name=testvar value=<?php echo $testvar; ?>>
> the value shown in the form field is a and not a b c
> why?
> and how can I get to see the untrucated text, please?
>
> Mike
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>