Re: Populating textboxes and listboxes from a query result of a database table
| From: | Rick Emery | Date: | Thu, 26 Dec 2002 14:59:37 +0000 |
| Subject: | Re: Populating textboxes and listboxes from a query result of a database table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129351@lists.php.net to get a copy of this message | ||
Text box:
print "<INPUT type=text name=myname value=\"$data_value\">\n";
List box:
print "<SELECT name=myselect>\n";
while($row = mysql_fetch_array($result))
{
extract($row);
print "<OPTION value=\"$data_value\">$data_title</OPTION>\n";
}
print "</SELECT>\n";
----- Original Message -----
From: "Denis L. Menezes" <menezesd@singnet.com.sg>
To: <php-general@lists.php.net>
Sent: Thursday, December 26, 2002 6:13 AM
Subject: [PHP] Populating textboxes and listboxes from a query result of a database table
Hello friends,
Can someone please tell me where I can find sample scripts for populating
textboxes and listboxes on a form(when the form opens) using the data from
fields in a table?
Thanks
Denis