JezK
Edit File: front.php
<?php include('db_connect_db_new.php'); include('visitor_out.php'); $user1 = $_SESSION["user"]; if($_SESSION["loggedIn"] == 0) header("location: index.php"); $tody = date("Y:m:d"); $sql = "SELECT Name FROM info_visitor WHERE Date = '$tody'"; $sqlOnline = "SELECT * FROM info_visitor WHERE Status = 'ONLINE' LIMIT 10"; $sqlRecent = "SELECT * FROM (SELECT * FROM info_visitor ORDER BY Serial DESC LIMIT 10) a ORDER BY Serial DESC"; $resultToday = mysqli_num_rows(mysqli_query($link,$sql)); //recent Visitors $resultS = mysqli_query($link,$sqlOnline); //Online Visitors $onlineVsitor = mysqli_num_rows($resultS); $sqlResRecent = mysqli_query($link,$sqlRecent); ?> <!DOCTYPE HTML5> <html> <head> <link rel = "stylesheet" href= "BootStrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="navbar3.css"> <script src="BootStrap/js/jQuery.min.js"></script> <script src="BootStrap/js/bootstrap.min.js"></script> <style> body { max-width: 100%; max-height: 100%; overflow-y: hidden; overflow-x: hidden; } img {width:100%;} .affix { top:0; width: 100%; z-index: 9999 !important; } .navbar { margin-bottom: 0px; } .affix ~ .container-fluid { position: relative; top: 50px; } #coverPic{ width: 100%; height:35%; } .popover-title{ background: #3EFE00 !important; color: #000000; } input[type='number'] { -moz-appearance:textfield; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; } .col-sm-8{ background:#E9EEFC ; color:black; margin-left:15% } .col-sm-4{ background: linear-gradient(to top, #0066cc 0%, #33cccc 100%); background-image: url('bgimg.jpeg'); background-size: cover; color:white; } .col-sm-5{ background: linear-gradient(to top, #0066cc 0%, #33cccc 100%); background-size: cover; background-image: url('bgimg.jpeg'); color:white; } .image{ height:235%; width:20%; margin-top:-2.5% } .row{ background-size: cover; background-image: url('bgimg.jpeg'); } </style> </head> <body> <!-- Left and right controls --> <nav class="navbar navbar-default" data-offset-top="228"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="#" id = "lii"><span><img class="image" src="krifylogo.jpeg" alt="logo" width="6%" >  VISITOR MANAGEMENT</span></a> </div> <ul class="nav navbar-nav navbar-right"> <li class="active"><a href="front.php">Home</a></li> <li><a id = "li" href="myform.php" >Add Visitor</a></li> <li><a id = "li" href="logoutform.php" >Checked Out Visitors</a></li> <li><a id = "li" href="query_data.php" >View Data</a></li> <li><a id = "li" href="logout.php" >Logout</a></li> </ul> </div> </nav> <!--<?php echo "<h3 style = 'padding-left:15px;''> Welcome ' $user1 ' :</h3>";?> --> <div class="col-sm-5" style="padding-left: 50px;height:100%; width:50%"> <h4 class="h3" style="padding-left:10px;text-align:center;"><b>Details<b></h4><hr> <?php $showResultFor = 0; if(isset($_GET['rid'])){ $showResultFor = $_GET['rid']; } $query = "SELECT * FROM info_visitor WHERE ReceiptID = '$showResultFor' AND Status = 'ONLINE' "; $getresult = mysqli_query($link,$query); $resultDetails = mysqli_fetch_array($getresult, MYSQLI_ASSOC); if($resultDetails) {?> <div class="row" > <div class="col-sm-8" style = "padding-left:10%;padding-top:15px; font-size:16px;"> <p style="width: 678px;" id="col-1">Date :<?php echo $resultDetails['Date'];?> Time in : <?php echo $resultDetails['TimeIN'];?></p> <span id="col-1" name="main">Name : <?php echo $resultDetails['Name'];?></span><br> <span id="col-1">Contact No : <?php echo $resultDetails['Contact']?><br> <span id="col-1">Purpose : <?php echo $resultDetails['Purpose'];?></span><br> <span id="col-1">Meeting : <?php echo $resultDetails['meetingTo'];?></span><br> <span id="col-1">Company : <?php echo $resultDetails['company'];?></span><br> <span id="col-1">location: <?php echo $resultDetails['location'];?></span><br> <span id="col-1">Receipt ID : <?php echo $resultDetails['ReceiptID'];?></span><br> </span> <form method= "POST" action = ""> <div class="form-group"> <label class="control-label" id ="t" for="recept_id"></label> <input class = "form-control" value='<?php echo $resultDetails['ReceiptID']; ?>' name= "rid" type="hidden" placeholder="Enter Receipt ID." required /> </div> <?php {?> <input id="x" name ="logout" value = "Checkout" type ="submit" class="btn btn-danger" onclick='return confirm("Are you sure you want to Checkout?")'> <?php }?> <?php if($_SERVER['REQUEST_METHOD'] == 'POST'){ if($success == 1) echo "<span style = 'color:green;'>Done !</span>"; else echo "<span style = 'color:red;''>Sorry ! No match found.</span>"; } ?> </form> </div> </div> <?php }?> </div> <div class="col-sm-4" style="height:100%; width:50%"> <h3 class="h3" style="margin-right:auto;padding-left:40px;"><b>Recent Visitors :<b> <?php echo $onlineVsitor;?></h3><hr> <ul class="list-group" style="width:80%;padding-top:20px;"> <script> $(document).ready(function(){ $('[data-toggle="popover"]').popover({ container: 'body' }); }); </script> <?php while($result2 = mysqli_fetch_array($resultS, MYSQLI_ASSOC)) echo '<div style = "padding-right:45px;padding-left:20px;"> <li class = "list-group-item" style="height :30px;padding-top:3px;"> <a style = "font-size:15px;" href="front.php?rid='.$result2['ReceiptID'].'" data-html="true" title="<b>'.$result2['Name'].'<b>" data-toggle="popover" data-trigger="hover" data-content="Contact : '.$result2['Contact'].' <br>Time in : '.$result2['TimeIN'].' <br>Purpose : '.$result2['Purpose'].' <br>Company: '.$result2['company'].' <br>Location: '.$result2['location'].' <br> R ID : '.$result2['ReceiptID'].'">'.$result2['Name'].'</a> </li> </div>' ?> </ul> </div> <body/> <html/>