<?php 
require_once '../auth/auth.php';
require_once '../models/db_connection.php';

$selectstudent = mysqli_query($conn, "SELECT * FROM students WHERE student_id = '$_GET[id]'");
$myData = mysqli_fetch_array($selectstudent);

?>

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

<head>
 <title>Student | Add Student </title>
 <?php include("../templates/header.php"); ?>
</head>
<body>
  <div class="container-scroller">
    <!-- partial:partials/_navbar.html -->
    <?php include("../templates/nav.php"); ?>
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
      <!-- partial:partials/_sidebar.html -->
      <?php include("../templates/sidenav.php"); ?>
      <!-- partial -->
      <div class="main-panel">
        <div class="content-wrapper">
        <div class="col-md-12 grid-margin">
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">Student Details</h4>
                  <p class="card-description">
                   
                  </p>
                  <div class="row">
                    <div class="col-md-6">
                      <p class="text"><b>Registration Number:</b> <?= $myData['en_id'] ?></p>
                      <p class="text"><b>Fullname:</b> <?= $myData['fullname'] ?></p>
                        <p class="text"><b>Age:</b> <?= $myData['age'] ?></p>
                      <p class="text"><b>Identification Number:</b> <?= $myData['ident_number'] ?></p>
                      <p class="text"><b>Street:</b> <?= $myData['street'] ?></p>
                      <p class="text"><b>Address:</b> <Address><?= $myData['address'] ?></Address></p>
                    </div>
                    <div class="col-md-6">
                    
                      <p><img src="../uploads/<?= $myData['filename'] ?>" alt="" height="120px"></p>
                      <hr>
                      <p class="text"><b>Work:</b> <?= $myData['work'] ?></p>
                      <p class="text"><b>Education:</b> <?= $myData['education'] ?></p>
                      <p class="text"><b>Gender:</b> <?= $myData['gender'] ?></p>
                      <p class="text"><b>Phone:</b> <?= $myData['phone_number'] ?></p>
                      <p class="text"><b>Eye Problems:</b> <?= $myData['eye_problems'] ?></p>
                      <p class="text"><b>Ear Problems:</b> <?= $myData['ear_problems'] ?></p>
                      <p class="text"><b>Sensitive Case:</b> <?= $myData['sensitive_case'] ?></p>
                    </div>
                  </div>
                  <div class="row">
                        <a href="../controllers/studentpdf.php?id=<?= $_GET['id'] ?>" class="btn btn-dark btn-lg ">Print Details</a>
                  </div>
                </div>
              </div>
            </div>
        
        </div>
        <!-- content-wrapper ends -->
        <!-- partial:partials/_footer.html -->
        <?php include("../templates/footer.php"); ?>
        
        <!-- partial -->
      </div>
      <!-- main-panel ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>
    <?php include("../templates/inc_scripts.php"); ?>
</body>

</html>

