I display records from one table. On every rows I add 2 columns (type of listbox). They are filled from another tables. How can I save choiced values from listboxes after Save?
<!-- Anesteziolog -->
<form name="myForm" action="cos_den.php" method="post">
<?php
echo"<td >";
$cpquery = "Select anesteziolog from anesteziolog order by anesteziolog";
$cpresult = mysql_query($cpquery) or die(mysql_error());
?>
<select name="anesteziolog" value="anesteziolog">
<!-- Drop down -->
<?php
if($cpresult)
{
while($row = mysql_fetch_array($cpresult))
{
echo '<option value="' .$row['anesteziolog']. '">'. $row['anesteziolog'].</option>';
}
}
echo "<option value='anesteziolog' ></option>";
echo "</select>";
echo "</td>";
// End: Anesteziolog
//Typ anesteziologie
echo"<td >";
$cpquery = "Select anest_typ from anest_typ order by anest_typ";
$cpresult = mysql_query($cpquery) or die(mysql_error());
?>
<select name="anest_typ" value="anest_typ">
<!-- Drop down -->
<?php
if($cpresult)
{
while($row = mysql_fetch_array($cpresult))
{
echo '<option value="' .$row['anest_typ'].'">'. $row['anest_typ']. '</option>' ;
}
}
echo "<option value='anest_typ' ></option>";
echo "</select>";
echo "</td>";
// End: Typ anesteziologie
echo "</tr>";
}
echo "</table>";
?>
<p class="submit"><input type="submit" value="Save" name="submit" ></>
</form>
luma64 0 Newbie Poster
pixelsoul 272 Red Pill Featured Poster
luma64 0 Newbie Poster
pixelsoul 272 Red Pill Featured Poster
luma64 0 Newbie Poster
pixelsoul 272 Red Pill Featured Poster
luma64 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.