im new here and also fairly new to php. i am trying to create a form that has multiple fields being:
the select box is a list of suppliers and the text fields are Contact(persons name), Telephone number, Email. When the user selects a value from the select box the 3 text fields are filled in with the matching contact details(fetched from a database). The text fields need to remain editable incase a phone number/point of contact has changed.
I have the select box fetching suppliers and supplier ID with the following.
$query1 = "SELECT * FROM suppliers";
$result1 = mysql_query($query1) or die(mysql_error());
//$result = mysql_query ($query);
echo "<select name='supplier'>";
// printing the list box select command
echo "<option value=\"$row1[Supplier_ID]\">$row1[Supplier]</option>";
echo "</select>";// Closing of list box
Database field names are as follows:
Supplier_ID (Auto Increment and Primary)
Supplier (name of)
any help appreciated I hope I have explained my problem clearly enough.