HI all.
I am trying to populate a drop down from two separate sources.
The page is used for editing data so I want the current data in the drop down and the ist is populated from another table. I can get this to work but my form is not passing the data to write back to the database.
My problem is that I am calling from two sources therefore my strings are different.
Snippet of code to help.
[php]While ($r = mysql_fetch_array($result)) {
$code = $r[“code”];
$desc = $r[“desc”];
$val = $r[“val”];
$com1 = $r[“com1”];
$com2 = $r[“com2”];
$com3 = $r[“com3”];
$dateadd = $r[“dateadd”];
$dateup = $r[“dateup”];
$user = $r[“user”];
$options1 = ‘’;
$filter1=mysql_query(“select distinct temp from temp”);
while($row1 = mysql_fetch_array($filter1)) {
$options1 .="" . $row1[‘temp’] . “”;
}
echo $search_results .= "
ID: | $id <input type='hidden' name='id' value='$r[id]' |
Product code: | |
Description: | |
Value: | |
Temperature: | $com1 $options1 |