tags:

views:

25

answers:

1

hii everybody, i want to show dropdown box calling from another dropdown. when one is selected, another dropdown will be called from database values. i am using this code :

echo $fginfo=" <td width='150' class='label'>Items</td>
                <td class='content' colspan='3'> 

                <select name='item_code' id='item_code' onchange=\'checkitemcode();\'>
                    <option value='0'>Select Item</option>".
                    $sql12=mysql_query('select * from item_master_raw where status=1 order by item_name asc ');
                     while($row12 = mysql_fetch_array($sql12)) 
                    { "<option value='$row12[item_code_rw]'>$row12[item_name]</option>".}"
                    </select>
                </td>";

but the values from the database are not seen. plz help me. thanks.

A: 

Lol, try this:

<td width='150' class='label'>Items</td>
                <td class='content' colspan='3'> 

                <select name='item_code' id='item_code' onchange=\'checkitemcode();\'>
                    <option value='0'>Select Item</option>"
<?php
                    $sql12=mysql_query('select * from item_master_raw where status=1 order by item_name asc ');
                     while($row12 = mysql_fetch_array($sql12)) 
                    { 
                       echo "<option value='$row12[item_code_rw]'>$row12[item_name]</option>";
                    }
?>

                    </select>
                </td>
frisco
thank you, very much.....
if it works please accept the answer as correct.
frisco