Re: Text data truncated after first blank character in form fields

From: Date: Tue, 18 Feb 2003 08:27:39 +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-135967@lists.php.net to get a copy of this message
Errnest Thanks. I used htlmentities and still have the truncation. Mike --- Ernest E Vogelsinger wrote:
At 22:04 17.02.2003, Michael Eacott said: --------------------[snip]--------------------
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?
--------------------[snip]-------------------- You should always place quotes around the "Value" parameter; <input type="text" size=20 name=testvar value="<?php echo $testvar; ?>"> Additionally you should always htmlencode the value parameter: <input type="text" size=20 name=testvar value="<?php echo htmlentities($testvar); ?>">


« previous php.general (#135967) next »