exit;
         }
     }
 }
 if (isset($_POST['confirm_magazine_borrow'])) {
     //include '../includes/Pages_Func.php';
     require_once '../private/LMS_Engine.php';
     $engine = new LMS_Engine();
     $user_id = $_POST['user_id'];
     $mag_id = $_POST['Mag_ID'];
     $pocket_id = $_POST['pocket_id'];
     $user_type = $_POST['user_type'];
     $librarian_id = $_COOKIE['user_id'];
     if ($user_type == "student") {
         $user_type = "S";
         $The_STD = $engine->get_student_by_pid($pocket_id);
         $cur_time = date("y-m-d H:i:s", time());
         $stat = $engine->insert_magazine_borrows($user_id, $user_type, $mag_id, $librarian_id);
         if ($stat) {
             header("Location: ../Librarian.php?page=search_magazine");
             exit;
         } else {
             header("Location: ../Librarian.php?page=search_magazine");
             exit;
         }
     } else {
         $user_type = "T";
         $cur_time = date("y-m-d H:i:s", time());
         $stat = $engine->insert_magazine_borrows($pocket_id, $user_type, $mag_id, $librarian_id);
         if ($stat) {
             header("Location: ../Librarian.php?page=search_magazine");
<?php

if (isset($_POST['user_id'])) {
    $user_id = $_POST['user_id'];
    require_once 'private/LMS_Engine.php';
    $engine = new LMS_Engine();
    $Student = $engine->get_student_by_pid($user_id);
}
?>
<div class="container">
    <hr>
    <div class="row">
        <div class="container">
        </div>
        <hr>
        <div class="col-md-3 col-lg-3 ">
            <h3>Book Information</h3>
            <div class="container">
                <div  class="row" id="contact">
                    <form class="form-vertical" method="post" action="">
                        <label class="form-control" for="book_title">Book Title: <?php 
echo $book_data['title'];
?>
 </label> <br>
                        <label class="form-control">Book Call ID: <?php 
echo $book_data['call_id'];
?>
</label> <br>
                        <label class="form-control">Book Copy No: <?php 
echo $book_data['copy_number'];
?>