Hi All
I have 2 tables in a mysql database
Customer_list
- cus_id
- Customer name[/code]
Machine_list
- cus_id
- machine_id
- machine_name
I want a dropdown list listing the Customer names, once a name has been select the machine id and name must be displayed
I have the following code
$form_mach_edit ="<form name = \"customer\" action=\"$self\" method=\"post\">";
$form_mach_edit .="<select name='Cus_ID'>";
while ($row_cus = mysql_fetch_array($rs_cus))
{
#$Cus_ID =$row_cus['Cus_ID'];
$Customer_Name =$row_cus['Customer_Name'];
$form_mach_edit .="<option value ='$Cus_ID'>$Customer_Name </option>";
}
$form_mach_edit .="</select>";
$form_mach_edit .="<input type=\"submit\" value=\"Update\">";
$form_mach_edit .="</form>";
$form_mach_edit .="<BR>";
I then search the data base using the cus_id to then dislpay the details.
I am having trouble with the code above as I dont get a cus_id to use in my search
Thanks for the help
Martin