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 : 18.223.209.114


Current Path : /proc/thread-self/root/var/www/html/Regulations/
Upload File :
Current File : //proc/thread-self/root/var/www/html/Regulations/gul.php

<div class="container">
<form method='post' action='export.php'>
  <input type='submit' value='Export to Excel' name='Export'  style="margin-top: 10px; margin-left: 720px; margin-bottom: 20px;">

  <?php

error_reporting(E_ALL);
ini_set('display_errors', 'On');

$servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$username   = "admin";
$password  = "Logisys2104";

$conn = new  mysqli($servername,$username,$password);
if(!$conn) 
{
    die("Connection failed: " . mysqli_connect_error());
}



$fdegree= $_GET["fdegree"];
$val1= $_GET["val1"];




$query  ="select distinct s.fdegree, d.fdescpn, s.fexamno, s.fcsubcode, s.fqpcode, s.fssubname, s.fsmaxmarks, s.fsubname from {$val1}.subject s 
inner join {$val1}.degree d on s.fdegree=d.fdegree 
and s.fexamno=d.fexamno where fintass='F'and fretain='F'and d.fdegree='{$fdegree}'";
//var_dump($query);



$result = mysqli_query($conn, $query);





$table = '<table style="margin-left:2px;text-align: left;width: 90%;font-size:14px;margin: auto;" align-self="middle" cellspacing="1" cellpadding="5" border="1" align="center" bgcolor="white">
 <thead> 
      <tr style = "background-color:#8acc51">
       <th width="8%"><center>Degree Code</center></th>
             <th width="32%"><center>Degree Name</center></th>
             <th><center>Semester</center></th>
          <th width="8%"><center>Subject Code</center></th>
       <th width="43%"><center>Subject Name</center></th>
       <th  width="8%"><center>Sub Elements</center></th>
       <th  width="9%"><center>QP Code</center></th>
       <th  width="6%"><center>Max Marks</center></th>
       
      </tr>
    </thead>
    <tbody>';


    while ($row = mysqli_fetch_assoc($result)) {

        $field1name = $fdegree;
        $field2name = $row["fdescpn"];
        $field3name = $row["fexamno"];
       	$field4name = $row["fcsubcode"];
        $field5name = $row["fsubname"];
        $field6name = $row["fssubname"];
        $field7name = $row["fqpcode"];
        $field8name = $row["fsmaxmarks"];
         
        $user_arr[] = array($field1name,$field2name,$field3name,$field4name,$field5name,$field6name,$field7name,$field8name);

        $table .='<tr>
                  <td><center>'.$field1name.'</center></td> 
                  <td>'.$field2name.'</td> 
                  <td><center>'.$field3name.'</center></td> 
                  <td><center>'.$field4name.'</center></td> 
                  <td>'.$field5name.'</td>
                  <td><center>'.$field6name.'</center></td>
                  <td><center>'.$field7name.'</center></td>
                  <td><center>'.$field8name.'</center></td>
              </tr>';
    }
    $table .="</table>";
    echo $table;
    ?>

    <?php 
    $serialize_user_arr = serialize($user_arr);
   ?>
  <textarea name='Export' style='display: none;'><?php echo $table; ?></textarea>
 </form>
</div>