i'm trying to insert a value from a drop down box( whose options were gotten from a row from another table),into a row in another table
i have a form purchase order which wld choose a value from a drop down company name nd insert the value chosen into the company name row in the purchase order table.
how do i insert the option chosen into the row in purchaseorder
<?php
$link = mysql_connect("localhost", "root", ".....");
mysql_select_db("new", $link);
$query = "select company_name FROM supplier";
$results = mysql_query($query, $link) or die("Error performing query");
if(mysql_num_rows($results) > 0){
echo("<select name=\"selectItem\">");
while($row = mysql_fetch_object($results)){
echo("<option value=\"$row->record_id\">$row->company_name</option>");
}
echo("</select>");
}
else{
echo("<i>No values found</i>");
}
?>

New Topic/Question
Reply




MultiQuote





|