0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.147.126.199


Current Path : /var/www/html/univadmin/
Upload File :
Current File : /var/www/html/univadmin/option_reva.php

 <!doctype html>
 <html lang="en">

 <head>
   <meta charset="UTF-8">
   <title>database connections</title>
 </head>

 <body>
   <?php
   include("/var/www/config.php");
   $servername = SERVERNAME;
   $username   = USERNAME;
   $password  = PASSWORD;
 
    $databse = "logisys3_comexam";

    $connector = mysqli_connect($servername, $username, $password)
      or die("Unable to connect");
    // echo "Connections are made successfully";

    $db_select = mysqli_select_db($connector, "logisys3_reva");
    if (!$db_select) {
      error_log("Database selection failed: " . mysqli_error($connector));
      die('Internal server error');
    }

    //execute the SQL query and return records
    $fregno = $_POST['fregno'];
    $result = mysqli_query($connector, "SELECT s.fdegree, s.fregno, s.fname, s.fcollcode, s.fbatch1,
    (case when c.ftotalfee>'0' then 'Fee Paid' else 'Not Paid' end) as Status FROM student s
    inner join candsum c on s.fdegree= c.fdegree and s.fregno =c.fregno
    and s.fcollcode = c.fcollcode 
	  where s.fregno = '{$fregno}'");
    ?>
   <table border="2" style="background-color: white; color: Green; margin: 0 auto;">
     <thead>
       <tr>
         <th>Degree</th>
         <th>Register_No</th>
         <th>Student_Name</th>
         <th>College Code</th>
         <th>Option</th>
         <th>Status</th>

       </tr>
     </thead>

     <tbody>

       <?php
        while ($row = mysqli_fetch_assoc($result)) {
          echo
            "<tr>
			  <td>{$row['fdegree']}</td>
              <td>{$row['fregno']}</td>
              <td>{$row['fname']}</td>
              <td>{$row['fcollcode']}</td>
              <td>{$row['fbatch1']}</td>
              <td>{$row['Status']}</td>
            </tr>\n";
        }
        ?>
     </tbody>
   </table>

 </body>

 </html>