hi,
i am trying to display all the values from database 1 in select tag and store the selected options in database2.wen trying this only the first option value selected gets stored in db.other values r not getting stored.plea[size=4]se help in this.
this s my code for displaying the values of options from db.
CODE
<select name="test[]" id="test[]" multiple="true" size=5 class="style7"> <?php
while ($compRow=mysql_fetch_array($result))
{
echo "<option>{$compRow[0]}</option>\n";
}
?>
tis s the code for storing the selected elemnts in db.
CODE
<?php
$test1=$_POST['test'];
for($i=0;$i<sizeof($test1);$i++)
{
$result=mysql_query("INSERT INTO component(projectid,name)VALUES((select max(projectid) from project),'$test1[i]')")or die("Insert Error: ".mysql_error());
}
[size=7]
** Edit **