<?php include("db.php"); ?>
<h3>Biodata</h3>
                <!-- <hr/> -->
                <div class="container">
					<table class="table">
                        <tbody class="fullname-section">
                        <?php
                            // session_start();

                            if(!isset($_SESSION['sname'])){
                                header("location:validation/index.php");
                                exit();


                            }

                            $sname = $_SESSION["sname"];
                            $query ="SELECT mat, fname, sname, Dept, program, sessiond, school, leveld, sex, dob, email, phone, addressd, pbirth, sorigin, lgovt,pgname, pgnumb FROM portal WHERE sname = '$sname'";
                            $query_result = $db->query($query);

                            if($query_result->num_rows == 1){
                                $row = $query_result->fetch_assoc();
                               
                            }
                        ?>
                        
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span >Surname:</span>
                                </td>
                                <td><?php echo $row['sname']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>First Name:</span>
                                </td>
                                <td><?php echo $row['fname']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Matric Number:</span>
                                </td>
                                <td><?php echo $row['mat']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Program Type:</span>
                                </td>
                                <td><?php echo $row['program']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Session:</span>
                                </td>
                                <td><?php echo $row['sessiond']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>School:</span>
                                </td>
                                <td><?php echo $row['school']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Department:</span>
                                </td>
                                <td><?php echo $row['Dept']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Level:</span>
                                </td>
                                <td><?php echo $row['leveld']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Sex:</span>
                                </td>
                                <td><?php echo $row['sex']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Date of Birth:</span>
                                </td>
                                <td><?php echo $row['dob']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="statusicon" />
                                    <span>Email:</span>
                                </td>
                                <td><?php echo $row['email']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>Phone Number:</span>
                                </td>
                                <td><?php echo $row['phone']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>Residential Address:</span>
                                </td>
                                <td><?php echo $row['addressd']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>Place of Birth:</span>
                                </td>
                                <td><?php echo $row['pbirth']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>State of Origin:</span>
                                </td>
                                <td><?php echo $row['sorigin']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>Local Government Area (LGA):</span>
                                </td>
                                <td><?php echo $row['lgovt']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>Parent/Guardian Name:</span>
                                </td>
                                <td><?php echo $row['pgname']; ?></td>
                            </tr>
                            <tr >
                                <td>
                                    <img src="images/status.svg" width="20px" height="20px" alt="usericon" />
                                    <span>Parent/Guardian Phone Number:</span>
                                </td>
                                <td><?php echo $row['pgnumb']; ?></td>
                            </tr>
                        </tbody>
                    </table>

                    <div class="row" style="margin-bottom:50px;">
                        <div class="col-md-6" style="margin-bottom:10px;">
                            <button type="submit" onclick="window.print()" class="btn btn-primary btn-block"><i class="fa fa-print"></i> Print</button>
                        </div>
                        <div class="col-md-6">
                        <a href="index.php?env=dashboard" style="color:#ffffff;text-decoration:none;"> 
                            <button type="button" class="btn btn-primary btn-block"><i class="fa fa-arrow-left"></i> Go back</button>
                        </a>
                        </div>
                    </div>
				</div>