Re: Filling Forms with $variables
| From: | Steven Walker | Date: | Wed, 13 Feb 2002 22:11:15 +0000 |
| Subject: | Re: Filling Forms with $variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84670@lists.php.net to get a copy of this message | ||
Adding quotes around the whole php statement works! I also tried the htmlspecialchars() function, but that did not work. It makes sense because after the preprocess of php, no quotes would be left... it's obvious now :)
Thank you
Steven J. Walker
Walker Effects
www.walkereffects.com
steve@walkereffects.com
On Wednesday, February 13, 2002, at 02:05 PM, Christopher William Wesley wrote:
On Wed, 13 Feb 2002, Steven Walker wrote:<?$name = "Steven Walker"?> <form name="form1" method="post" action="infocollect.php"> <input type="text" name="name" value=<?echo "$name";?>> </form> In the browser, the name field is only filled with "Steven", and drops off everything after the space. If I echo $name outside of the form itYou need to put quotes around the value. value="<?echo $name;?>"? g.luck,~Chris /"\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php