RE: [PHP] Strings in text fields are bad

From: Date: Tue, 26 Sep 2000 03:52:20 +0000
Subject: RE: [PHP] Strings in text fields are bad
Groups: php.general 
Request: Send a blank email to php-general+get-17505@lists.php.net to get a copy of this message
You need to add slashes to your form field. eg $caddress = 12345 Abc Ave."; echo "<input type=text name=caddress value=\"$caddress\">"; It would probably also be a good idea to modify $caddress like follows: $caddress=stripslashes ( htmlspecialchars("12345 Abc Ave.")); So that any "'s in the address don't rebreak the value =" ... " Cheers, Lawrence. -----Original Message----- From: Tyler Longren [mailto:tyler.longren@midiowa.net] Sent: September 26, 2000 01:49 PM To: PHP-General Subject: [PHP] Strings in text fields are bad Hello everybody, When i do this: $caddress = "12345 Abc Ave."; echo "<input type=text name=caddress value=$caddress>"; Why does it only print out the '12345' part of $caddress into the text field? It's very important that it prints all of it in there. I suppose this has something to do with the form field. Does it not like spaces? Regards, Tyler Longren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#17505) next »