optech
03-23-2002, 01:02 PM
i've created an html form that allows a user to input data (duh)... all of the forms values are already in a MySQL database, and i've linked a combo drop-down box to the "name' value... what i want to do here is to have the rest of the form fill out with the pertaining data when the user selects a name from the existing list of names. dig?
the code i have so far is the easy part, and it fills up the combo box with a list from the DB, and will enter it back in when submitted, but the rest of the form stays blank (as i haven't coded that part in).
while ($contact = mysql_fetch_array($result1, MYSQL_ASSOC))
{
foreach ($contact as $col_value)
{
print "<option value=$col_value>$col_value</option>\n";
}
}
so what i want after this:
when the user selects name "dave" from the database, i want all the rest of the information from the "dave" row to fill in the remaining fields...
any ideas?
the code i have so far is the easy part, and it fills up the combo box with a list from the DB, and will enter it back in when submitted, but the rest of the form stays blank (as i haven't coded that part in).
while ($contact = mysql_fetch_array($result1, MYSQL_ASSOC))
{
foreach ($contact as $col_value)
{
print "<option value=$col_value>$col_value</option>\n";
}
}
so what i want after this:
when the user selects name "dave" from the database, i want all the rest of the information from the "dave" row to fill in the remaining fields...
any ideas?