<html>
    <title>
    </title>
    <body bgcolor="99ccff">
    <TABLE BORDER="1" cellpadding="0" CELLSPACING="0" align="center">
    <TR>
    <TD WIDTH="900" HEIGHT="87" BACKGROUND="title.jpg" VALIGN="middle">
    <FONT SIZE="+1" COLOR="orange" align="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Online Examination Results System</b></FONT></TD>
    </TR>
    </TABLE>
    <TABLE BORDER="0" cellpadding="0" CELLSPACING="0" align="center">
    <TR>
    <TD WIDTH="180" HEIGHT="40" BACKGROUND="but1.jpg" VALIGN="bottom">
    <FONT SIZE="+1" COLOR="yellow"><a href="ind.html" style="color: rgb(255,255,0)">Home</a></FONT></TD>
    <TD WIDTH="180" HEIGHT="40" BACKGROUND="but2.jpg" VALIGN="bottom">
    <FONT SIZE="+1" COLOR="yellow"><a href="dept.html" style="color: rgb(255,255,0)">Results</a></FONT></TD>
    <TD WIDTH="180" HEIGHT="40" BACKGROUND="but1.jpg" VALIGN="bottom">
    <FONT SIZE="+1" COLOR="yellow"><a href="contactt.html" style="color: rgb(255,255,0)">Contact Us</a></FONT></TD>
    <TD WIDTH="180" HEIGHT="40" BACKGROUND="but1.jpg" VALIGN="bottom">
    <FONT SIZE="+1" COLOR="yellow"><a href="feedback.html" style="color: rgb(255,255,0)">Feedback</a></FONT></TD>
    <TD WIDTH="180" HEIGHT="40" BACKGROUND="but1.jpg" VALIGN="bottom">
    <FONT SIZE="+1" COLOR="yellow"><a href="gallery.html" style="color: rgb(255,255,0)">Gallery</a></FONT></TD>
    </TR>
    </TABLE>
    <TABLE BORDER="1" cellpadding="0" CELLSPACING="0" align="center">
    <TR>
    <TD WIDTH="900" HEIGHT="50" bgcolor="brown" VALIGN="bottom">
    <FONT SIZE="+1" COLOR="yellow">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marks Details</FONT></TD></tr></table>
    <table width="900" border="1" align="center" cellpadding="0" cellspacing="1">
    <tr>
    <td>
    <?php
    $host="localhost"; // Host name
    $username="root"; // Mysql username
    $password="root"; // Mysql password
    $db_name="project"; // Database name
    $tbl_name="add_marks"; // Table name
    // Connect to server and select database.
    mysql_connect("$host", "$username", "$password")or die("cannot connect");
    mysql_select_db("$db_name")or die("cannot select DB");
    $id= $_POST['id'];
    $Studentid= $_POST['Studentid'];
    $Semester= $_POST['Semester'];
    $sql="SELECT * FROM $tbl_name where Studentid='$Studentid' AND Semester='$Semester'";
    $result=mysql_query($sql);
    ?>
    <table width="900" border="0" cellspacing="1" cellpadding="0">
    <tr>
    <td>
    <table width="900" border="1" cellspacing="0" cellpadding="3">
    <tr>
    <td colspan="4"><strong>List data from marks </strong> </td>
    </tr>
    <tr>
    <td align="center"><strong>id</strong></td>
    <td align="center"><strong>Studentid</strong></td>
    <td align="center"><strong>Department</strong></td>
    <td align="center"><strong>Subject</strong></td>
    <td align="center"><strong>Semester</strong></td>
    <td align="center"><strong>Marks</strong></td>
    <td align="center"><strong>Min</strong></td>
    <td align="center"><strong>Max</strong></td>
    <td align="center"><strong>Total</strong></td>
    <td align="center"><strong>Percentage</strong></td>
    </tr>
    <?php
    while($rows=mysql_fetch_array($result)){
    ?>
    <tr>
    <td><? echo $rows['id']; ?></td>
    <td><? echo $rows['Studentid'];?> </td>
    <td><? echo $rows['Department']; ?></td>
    <td><? echo $rows['Subject']; ?></td>
    <td><? echo $rows['Semester']; ?></td>
    <td><? echo $rows['Marks']; ?></td>
    <td><? echo $rows['Min']; ?></td>
    <td><? echo $rows['Max']; ?></td>
    <td><? echo $rows['Total']; ?></td>
    <td><? echo $rows['Percentage']; ?></td>
    </tr>
    <?php
    }
    ?>
    </table>
    </td>
    </tr>
    </table>
    <?php
    mysql_close();
    ?>
    </form>
    </td>
    </tr>
    </table>
    </body>
    </html>

**pls help me to diplay the marks of selected students chosen from the form when we clck the submit button  **
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.