<!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"> <?php session_start(); // if dont have session user..then if(! isset($_SESSION['memname'])) { session_write_close(); die("<script>alert('Please login first before proceed!');window.location.href='login.html';</script>"); } ?> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="shortcut icon" href="images/logo.png" type="image/x-icon" /> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.css"/> <link href="https://fonts.googleapis.com/css?family=Acme&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Teko:700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Poppins&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Courgette&display=swap" rel="stylesheet"> <script src="https://kit.fontawesome.com/0c641bf868.js" crossorigin="anonymous"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <title>Update Badminton Courts Booking</title> <style> .formcontainer{ margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; background: #031321; min-height: 75vh; } .btn{ display: block; width: 100%; height: 50px; border-radius: 25px; margin: 1rem 0; font-size: 1.2rem; outline: none; border: none; background-image: linear-gradient(to right, #32be8f, #38d39f, #32be8f); cursor: pointer; color: #fff; text-transform: uppercase; font-family: 'Poppins', sans-serif; background-size: 200%; transition: .5s; margin-top: 30px; } .btn:hover{ background-position: right; } .btncancel{ display: block; width: 100%; height: 50px; border-radius: 25px; margin: 1rem 0; font-size: 1.2rem; outline: none; border: none; background-image: linear-gradient(to right, #ff0000, #c20000, #ff0000); cursor: pointer; color: #fff; text-transform: uppercase; font-family: 'Poppins', sans-serif; background-size: 200%; transition: .5s; margin-top: 30px; } .btncancel:hover{ background-position: right; color:black; } .formcontainer .container form label{ font-family: 'Acme', sans-serif; text-align: justify; color: #fff;; } </style> </head> <body> <!--Navigation Bar--> <nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top"> <a class="navbar-brand" href="home.php"><img alt="Brand" src="images/logo.png" style="width: 80px; height: 80px;"></a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav ml-auto" style="padding-right: 50px;"> <li class="nav-item"> <a class="nav-link" href="home.php">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Arena </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="arena_facilities.php">Arena Facilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="badminton_court_booking.php">Badminton Court Booking</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="volleyball_court_booking.php">Volleyball Court Booking</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="squash_court_booking.php">Squash Court Booking</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="futsal_court_booking.php">Futsal Court Booking</a> <div class="dropdown-divider"></div> </div> </li> </li> <li class="nav-item"> <a class="nav-link" href="shop.php">Shop</a> </li> <li class="nav-item"> <a class="nav-link" href="about_us.php">About Us</a> </li> <li class="nav-item"> <a class="nav-link" href="faq.php">FAQ</a> </li> <li class="nav-item dropdown active"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Extras </a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="dropdown-item" href="member_profile.php">Profile</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="booking_history.php">Booking</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="my_purchases.php">My Purchase</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="logout.php">Logout</a> <div class="dropdown-divider"></div> </div> </li> </ul> </div> </nav> <?php include("conn.php");//add connection to the php page $bid = $_GET['id']; $sql = "SELECT * FROM member WHERE Mem_ID = $bid"; $result = mysqli_query($conn, $sql); if(mysqli_num_rows($result)<=0)//if no result, { die("<script>alert('Error in retrieving data!');window.location.href='member_profile.php'</script>"); } while($rows = mysqli_fetch_array($result)){ ?> <!--Content--> <div class="formcontainer"> <div class="container"> <form action="update_member.php" method="POST"> <label style="font-size: 30px; color: #edbb00;">Update Member Info</label> <div class="row" style="margin-top: 10px;"> <div class="col"> <input type="text" class="form-control" value="<?php echo $bid;?>" name="id" readonly required="required"> </div> <div class="col"> <input type="text" class="form-control" value="<?php echo $rows['Mem_Name'];?>" name="memname" required="required"> </div> </div> <div class="row" style="margin-top: 30px;"> <div class="col"> <input type="text" class="form-control" value="<?php echo $rows['Mem_Phone'];?>" name="phone" required="required"> </div> <div class="col"> <input type="email" class="form-control" value="<?php echo $rows['Mem_Email'];?>" name="email" required="required"> </div> </div> <div class="row" style="margin-top: 30px;"> <div class="col"> <input type="text" class="form-control" value="<?php echo $rows['Mem_Address'];?>" name="address" required="required"> </div> </div> <input type="submit" class="btn" value="Update"> <input type="submit" class="btncancel"value="Cancel" formaction="member_profile.php" formnovalidate/> </form> </div> <?php } ?> </div> <!--Footer--> <footer> <div class="footer-top"> <div class="container"> <div class="row"> <div class="col-md-4 col-sm-6 col-xs-12 segment-one md-mb-30 sm-mb-30"> <h3><font style="color: red;">Supreme</font> Sports Arena</h3> <p>Supreme Sports Arena is a newly built sports arena which include badminton, squash, volleyball and futsal. The Arena is provided with high quality facilities for the sports enthusiasts.</p> </div> <div class="col-md-4 col-sm-6 col-xs-12 segment-two md-mb-30 sm-mb-30"> <h2>Quick Links</h2> <ul> <li><a href="home.php">Home</a></li> <li><a href="arena_facilities.php">Arena Facilities</a></li> <li><a href="shop.php">Shop</a></li> <li><a href="about_us.php">About Us</a></li> <li><a href="faq.php">FAQ</a></li> </ul> </div> <div class="col-md-4 col-sm-6 col-xs-12 segment-three md-mb-30 sm-mb-30"> <h2>Contact Us</h2> <p><i class="fa fa-phone"></i> 012-3456789 (John Siena)</p> <p><i class="fas fa-envelope"></i> supremesportsarena@gmail.com</p> <a href="https://www.facebook.com/Supreme-Sports-Arena-113298846750542/?modal=admin_todo_tour" target="_blank"><i class="fab fa-facebook-square"></i></a> <a href="https://www.instagram.com/supreme_sports_arena/" target="_blank"><i class="fab fa-instagram"></i></a> <a href="https://twitter.com/ArenaSupreme" target="_blank"><i class="fab fa-twitter"></i></a> </div> </div> </div> </div> <p class="footer-bottom-text">All Right reserved by ©Supreme Sports Arena 2020</p> </footer> <!--Bootstrap js--> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.js"></script> <!--To make dropdown menu become hover accross--> <script> const $dropdown = $(".dropdown"); const $dropdownToggle = $(".dropdown-toggle"); const $dropdownMenu = $(".dropdown-menu"); const showClass = "show"; $(window).on("load resize", function () { if (this.matchMedia("(min-width: 768px)").matches) { $dropdown.hover( function () { const $this = $(this); $this.addClass(showClass); $this.find($dropdownToggle).attr("aria-expanded", "true"); $this.find($dropdownMenu).addClass(showClass); }, function () { const $this = $(this); $this.removeClass(showClass); $this.find($dropdownToggle).attr("aria-expanded", "false"); $this.find($dropdownMenu).removeClass(showClass); } ); } else { $dropdown.off("mouseenter mouseleave"); } }); //let the nvbar stick on top // When the user scrolls the page, execute myFunction window.onscroll = function () { myFunction() }; // Get the navbar var navbar = document.getElementById("navbar"); // Get the offset position of the navbar var sticky = navbar.offsetTop; // Add the sticky class to the navbar when you reach its scroll position. Remove "sticky" when you leave the scroll position function myFunction() { if (window.pageYOffset >= sticky) { navbar.classList.add("sticky") } else { navbar.classList.remove("sticky"); } } </script> </body> </html>