Re: using <input> tags with php
| From: | janet at valade dot com | Date: | Sat, 01 Feb 2003 21:28:09 +0000 |
| Subject: | Re: using <input> tags with php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133914@lists.php.net to get a copy of this message | ||
In a message dated 2/1/2003 12:52:24 PM Pacific Standard Time,
rusty_81@msn.com writes:
>i want to set up a form that will load values from a table and make them the
>"value" of the edit box... then when people press an update button then all
>of the stuff that changes from the record already in the table gets
>changed... anybody know how to make it where you can get the values out of a
>table and make them the default value of a input field...?
Basically, get your field values from the database and put them in variables.
Then use the variables in your form. For instance,
echo "<input type='text' name='first_name'
value='$first_name'>";
Then, in the script that processes the form, update the database record with
the values that were passed from the form.
Janet