<center><table  border="2">
<tr><td><p><center>YOUR SCHOOL IS </center> </p></td></tr>
<tr> <td colspan="2" id="combo">

 <?php  
 require("Dbconnect.php");
 $qry="select class_id,class_name from master_class";
 $result=mysql_query($qry);
 echo "FROM";
 echo "<SELECT name='combo1' size='3' >\n";/* creating Ist drop down*/
 while($row=mysql_fetch_array($result))
 {
     echo "<option value='$row[0]'>$row[1]</option>\n";
}
echo "</select>";     
 $qry="select class_id,class_name from master_class";/* creating 2nd drop down*/
 $result=mysql_query($qry);
echo "TO";
 echo "<SELECT name='combo2' size='3'>\n";
 while($row=mysql_fetch_array($result))
 {
     echo "<option value='$row[0]'>$row[1]</option>\n";
}
echo "</select>";
 ?>

 </td></tr>
<tr><td colspan="2"><center><input type="submit" value="ok" onclick="section()"</center></td></tr>
</table></center>

<div id="hd" style="position:absolute;top:30%;left:20%;height:5%;width:60%;border:solid pink;visibility: hidden;">
<center>ADD SECTIONS TO YOUR CLASSES</center>
</div>

I want the values of selected options below "ADD SECTIONS TO YOUR CLASSES"..in same php file .I tried it to find on google but failed to get anything .

mmcdonald commented: Not useful - please use much greater detail. If you want great responses post great questions! -1

Recommended Answers

All 2 Replies

Shikha_1 you're continuing to ignore forum rules:

Create a meaningful thread title. So you've searched and haven't found anything that fits your problem? Great! We can help, but you need to peak our interest with a thread title that briefly describes your problem. Many members browse the topic list and choose which threads to post in only by the title. Oh, and for future reference, "PHP Help", "PHP Question", or any variation thereof does not describe your problem. We're well aware that this forum is about PHP and the majority of threads are asking questions or need help.

Please stop starting threads with not useful titles.

Yes. This is PHP.

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.