here is the code. I m using multiple select in the code having same values. Please help me ..have to add different items in database so I am having multiple select tag at the same time different items can be added using different select options.
<?php
$db_host='localhost';
$db_user='root';
$db_pass='';
$db_database='foodwrap1';
$con=mysqli_connect("$db_host", "$db_user", "$db_pass")or die("cannot connect");
mysqli_select_db($con,$db_database)or die("cannot select DB");
$id=$_SESSION['restid'];
$sql="Select cat_name from category where rest_id=$id";
$result=mysqli_query($con,$sql) or die(mysql_error()."no data");
?>
<td width="7" height="39"></td>
<td >Select Category</td>
<?php $scat=implode("cat",$k);?>
<td colspan="3"><select name="<?php echo $cat?>">//name assigned to select
<?php
while($row=mysqli_fetch_row($result))
{
$ca = $row[0];
?>
<option value="<?php echo $ca; ?>"><?php echo $ca;}?></option>
</select>
if(isset($_POST['additems']))
{
for($i=1;$i<=10;$i++)
{
$icat=$_POST['']; // what to write here?how will i get the name.
echo $icat;
}