JezK
Edit File: details.php
<?php require_once 'db_connection.php'; require_once 'functions.php'; // Check if user is logged in (you may need to implement session management) // Example: session_start(); if (!isset($_SESSION['username'])) { header("Location: login.html"); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- Mirrored from www.jntukbiotech.com/new/ by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 29 Mar 2019 10:05:46 GMT --> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="style.css"> <title>D.L.Reddy College </title> <link rel="icon" href="images/favicon.ico" type="img/x-icon"> <link href="js/js-image-slider.css" rel="stylesheet" type="text/css" /> <script src="js/js-image-slider.js" type="text/javascript"></script> <script language="javascript1.0"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"> </script> <script> var repeat = 1 //enter 0 to not repeat scrolling after 1 run, othersise, enter 1 var title = document.title var leng = title.length var start = 1 function titlemove() { titl = title.substring(start, leng) + title.substring(0, start) document.title = titl start++ if (start == leng + 1) { start = 0 if (repeat == 0) return } setTimeout("titlemove()", 100) } if (document.title) titlemove() </script> <style> .container { min-height: 100vh; display: flex; flex-direction: column; } .middle-box { background-color: #f2f2f2; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); flex-grow: 1; /* Fill remaining space */ } .footer { background-color: #004b81; color: #fff; padding: 20px; text-align: center; margin-top: auto; /* Push footer to the bottom */ } .middle-box .left p { padding: 0px 10px; line-height: 22px; } /* Styles for form fields */ .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 5px; font-weight: bold; } input[type="text"], input[type="email"], textarea, select { width: 100%; /* Full width for all fields */ padding: 10px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 16px; } select { width: calc(100% - 2px); /* Subtracting border width to avoid horizontal scrollbar */ } textarea { resize: vertical; } .form-group.row:after { content: ""; display: table; clear: both; } .form-group.row { width: 100%; } .form-group.row .col-half { width: 50%; float: left; box-sizing: border-box; padding: 8px; } .form-group.row .col-full { width: 100%; padding: 8px; } button[type="submit"] { padding: 10px 30px; background-color: #004b81; border: none; border-radius: 5px; color: #fff; font-size: 16px; cursor: pointer; display: block; margin: auto; } button[type="submit"]:hover { background-color: #0056b3; } .container{ padding: 5% 10%; } table tr th{ color : #fff; } table { width: 100%; border-collapse: collapse; margin-top: 20px; } table tr:nth-child(odd) { background-color: #f2f2f2; } table th, table td { padding: 8px; border: 1px solid #ddd; text-align: left; } table th { background-color: #004b81; color: #fff; } table td { color: #333; } .logout_btn{ float: right; background: #004b81; padding: 5px 10px; } .logout_btn a{ color: white; text-decoration: none; } </style> </head> <body> <div class=""> <div class="header"> <div class="content"> <div class="title">DWARAMPUDI LAKSHMANA REDDY COLLEGE <div class="title_aac">( Affiliated to Adikavi Nannaya University ) </div> </div> </div> </div> <div class="container"> <div class="middle-box"> <button class="logout_btn"><a href="logout.php">Logout</a></button> <h2>Select Details</h2> <select id="detailType">Select Details <option>Select Grievance</option> <option value="grievance">Grievance</option> <option value="student">Student</option> <option value="teacher">Teacher</option> </select> <div id="detailsTable"> <!-- Details will be displayed here --> </div> </div> </div> </div> <div class="footer"> <div> <p>©All rights reserved 1987-2018 D.L.Reddy College, Gollala Mamidada.</p> </div> <div style="display: flex; align-items: center"> <p>Designed & Maintained by</p> <a href="https://krify.co" target="_blank"><img src="./images/krify.png"></a> </div> </div> </div> </div> <a href="#" class="scrollToTop"> </a> <script> $(document).ready(function() { $('#detailType').change(function() { // alert('hello'); var selectedType = $(this).val(); $.post("get_details.php", { type: selectedType }, function(data) { $('#detailsTable').html(data); }); }); }); </script> <script> $(document).ready(function(){ //Check to see if the window is top if not then display button $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); //Click event to scroll to top $('.scrollToTop').click(function(){ $('html, body').animate({scrollTop : 0},800); return false; }); }); </script> </body> </html>