Filling Forms with $variables
| From: | Steven Walker | Date: | Wed, 13 Feb 2002 21:56:15 +0000 |
| Subject: | Filling Forms with $variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84657@lists.php.net to get a copy of this message | ||
Hi,
I'm having trouble setting the value of form elements using variable values. For example:
<?$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 it prints fine.
Any help would be really appreciated. Thanks!
Steven J. Walker
Walker Effects
www.walkereffects.com
steve@walkereffects.com