
<?php
// Start the session
session_start();

?>




<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" rel="stylesheet">
    <title>my concerns</title>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
  <style>
.error {color: #FF0000;}
body {
  background-color: aqua;
}
</style>


  
  </head>
 <body class="p-3 m-0 border-0 bd-example m-0 border-0">
    <?php //include 'menu.php';?>
    <font face='verdana'>
        
      

        
        
      <!--  
     <center><h3><div class="d-grid gap-2">
  <button class="btn btn-primary" type="button">My concerns</button>
  
</div></h3></center>
-->
<!--
<script>alert("Please scroll down on the next page to see the list of people.")</script>
 -->    
     
     <?php
$servername = "localhost";
$username = "commemay_sono";
$password = "Masiu@5$5$5$";
$dbname = "commemay_csc";

        // Create connection
        $conn = new mysqli($servername, $username, $password, $dbname);
        // Check connection
        if ($conn->connect_error) {
              die("Connection failed: " . $conn->connect_error);
        }
        
        //variable for counting the total number of teacher
        $number = 6 ;
        
        // $num = $_SESSION["num"];
        
       // $number =   $_SESSION['num'];
        
        echo $_SESSION["surname"];
            
        $sql = "SELECT *  FROM parentconcerns WHERE uniquenum = '$number' ";
        $result = $conn->query($sql);

       echo '<table class="table table-light table-striped table-hover">';
       echo '<tbody>';
       
        if ($result->num_rows > 0) {
         // output data of each row
         while($row = $result->fetch_assoc()) {
       
       //setting the variable names
       
        $tconcern = $row["tconcern"];
        $addressedto = $row["addressedto"];
        $regarding = $row["regarding"];
        $school = $row["school"];
        $concern = $row["concern"];
       
       
       
        echo ' <tr  >
     
      <td colspan="3" ><center><button type="button" class="btn btn-primary">
        '.$school.'
            </button></center> </td>
     
      
    </tr>';
       
       echo ' <tr>
     
      <td>'.$tconcern.' </td>
      <td>'.$addressedto.'  </td>
       <td>'.$regarding.'  </td>
      
    </tr>';
    
     echo ' <tr>
     
      <td colspan="3">'.$concern.' </td>
      
      
    </tr>';
    
    /*
    
    echo ' <tr>
     
      <td>'.$sub1.'</td>
      <td>Grd'.' '.$g1.'  </td>
      
    </tr>';
    
    echo ' <tr>
     
      <td>'.$sub2.'</td>
      <td>Grd'.' '.$g2.'  </td>
      
    </tr>';
    
  //checking if there is subject 3 and subject 4
  
   $sub3len = strlen($sub3);
   
   if ($sub3len > 0){
       
      echo ' <tr>
     
      <td>'.$sub3.'</td>
      <td>Grd'.' '.$g3.'  </td>
      
    </tr>'; 
       
   }
   
   $sub4len = strlen($sub4);
   
   if ($sub4len > 0){
       
      echo ' <tr>
     
      <td>'.$sub4.'</td>
      <td>Grd'.' '.$g4.'  </td>
      
    </tr>'; 
       
   }
   
    echo ' <tr >
     
      <td colspan="2"> <center>Currently working @ </center>  </td>
     
      
    </tr>';
   
    echo ' <tr>
     
      <td colspan="2" ><center><button type="button" class="btn btn-primary">
  '.$province.' '.$district.' District<br/> <span class="badge text-bg-danger">'.$town.'</span>
</button></center></td>
      
      
    </tr>';
    
     echo ' <tr>
     
      <td colspan="2"> <center>Need a cross transfer to either</center>  </td>
     
      
    </tr>';
    
     echo ' <tr>
     
      <td>1. '.$to1.'</td>
      <td>4. '.$to4.'  </td>
      
    </tr>';
    
    echo ' <tr>
     
      <td>2. '.$to2.'</td>
      <td>5. '.$to5.'  </td>
      
    </tr>';
    echo ' <tr>
     
      <td>3. '.$to3.'</td>
      <td>6. '.$to6.'  </td>
      
    </tr>';
    
   
    
    echo ' <tr>
     
      <td>Cell num</td>
      <td>'.$cellnum.'  </td>
      
    </tr>';
    echo ' <tr>
     
      <td>Whatsapp</td>
      <td>'.$whatsapp.'  </td>
      
    </tr>';
    
    
    echo"<br />";   
      */  
       //incrementing number variable
       $number++;
         }
            } 
            
            
        $conn->close();
        
        echo '</tbody>';
        echo '</table>';
        
       echo '<center> <div class="d-grid gap-2"><a href = "/parentportal.php">
  <button class="btn btn-primary" type="button"><center>Home</center></button></a>
  
</div> </center';
        
?> 
     
     
     
   </font> 
     <!-- End Example Code -->
  </body>
</html>