Download Code – Resort Reservation System Source in PHP and SQLite3
Resort Reservation System in PHP
This project is called the Resort Reservation System, a simple web application that helps resort management efficiently store and manage reservation records. It is developed using PHP Database, with a clean and user-friendly interface built on the Bootstrap v5 Framework. The system includes CRUD (Create, Read, Update, Delete) operations and various features designed to streamline the resort’s reservation management process.
How the Resort Reservation System Works
The Resort Reservation System is designed for use by the resort management. It allows them to list rooms/cottages, manage extra fees, and handle customer reservation records. Management can input customer reservation details, assign rooms/cottages, and add any extra charges when customers check in.
Key Features and Functionalities
- Login and Logout
- Room/Cottage Management
- Add New Room/Cottage
- List All Rooms/Cottages
- Update Room/Cottage Details
- View Room/Cottage Details
- Delete Room/Cottage
- Extra Fee Management
- Add New Extra Fee
- List All Extra Fees
- Update Extra Fee Details
- View Extra Fee Details
- Delete Extra Fee
- Reservation Management
- Add New Reservation
- List All Reservations
- Update Reservation Details
- View Reservation Details
- Delete Reservation
- User Management
- Add New User
- List All Users
- Update User Details
- View User Details
- Delete User
Technologies Used
This Resort Reservation System is built using the following technologies:
- XAMPP or WAMP server
- VS Code Editor
- HTML, CSS, PHP, JavaScript
- SQLite3 Database
- jQuery and Ajax Requests
- Bootstrap Framework
- Google Icons
Installation Instructions
- Requirements:
- Install a local web server like XAMPP or WAMP.
- Download the source code zip file.
- Setup Instructions:
- Open your XAMPP/WAMP php.ini file and uncomment the sqlite3 extension.
- Start Apache on XAMPP/WAMP.
- Extract the downloaded source code zip file.
- Copy the extracted folder to the “htdocs” directory (for XAMPP) or “www” directory (for WAMP).
- Access the Resort Reservation System in a browser at:
http://localhost/php-sqlite-cqs/
.
- Default Admin Login:
- Username: admin
- Password: sourcecodester&123
Conclusion
This Resort Reservation System, developed in PHP and SQLite3, is intended for educational purposes and is available for free download. Feel free to modify the source code to suit your needs. I hope this project helps you with your current and future PHP projects.
index PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
<?php require_once('auth.php'); require_once('DBConnection.php'); $page = $_GET['page'] ?? 'home'; $title = ucwords(str_replace("_", " ", $page)); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?= ucwords($title) ?> | RRS</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" /> <link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/custom.css"> <script src="./js/jquery-3.6.0.min.js"></script> <script src="./js/popper.min.js"></script> <script src="./js/bootstrap.min.js"></script> <script src="./js/script.js"></script> </head> <body> <main> <nav class="navbar navbar-expand-lg navbar-dark bg-primary bg-gradient fixed-top mb-5" id="topNavBar"> <div class="container"> <a class="navbar-brand" href="./"> RRS </a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav"> <li class="nav-item"> <a class="nav-link <?php echo ($page == 'home')? 'active' : '' ?>" aria-current="page" href="./">Home</a> </li> <li class="nav-item"> <a class="nav-link <?php echo ($page == 'rooms')? 'active' : '' ?>" aria-current="page" href="./?page=rooms">Room List</a> </li> <li class="nav-item"> <a class="nav-link <?php echo ($page == 'fees')? 'active' : '' ?>" aria-current="page" href="./?page=fees">Fee List</a> </li> <li class="nav-item"> <a class="nav-link <?php echo ($page == 'reservations')? 'active' : '' ?>" aria-current="page" href="./?page=reservations">Reservation List</a> </li> <?php if($_SESSION['type'] == 1): ?> <li class="nav-item"> <a class="nav-link <?php echo ($page == 'users')? 'active' : '' ?>" aria-current="page" href="./?page=users">Users</a> </li> <?php endif; ?> </ul> </div> <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle bg-transparent text-light border-0" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false"> Hello <?php echo $_SESSION['fullname'] ?> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1"> <li><a class="dropdown-item" href="./?page=update_account">Change Password</a></li> <li><a class="dropdown-item" href="./LoginRegistration.php?a=logout">Logout</a></li> </ul> </div> </div> </nav> <div class="container-md pt-5 pb-3" id="page-container"> <div class="my-4"> <?php if(isset($_SESSION['message']['success'])): ?> <div class="alert alert-success py-3 rounded-0"> <?= $_SESSION['message']['success'] ?> </div> <?php unset($_SESSION['message']['success']) ?> <?php endif; ?> <?php if(isset($_SESSION['message']['error'])): ?> <div class="alert alert-danger py-3 rounded-0"> <?= $_SESSION['message']['error'] ?> </div> <?php unset($_SESSION['message']['error']) ?> <?php endif; ?> <?php include($page.".php"); ?> </div> </div> <footer class="position-fixed bottom-0 w-100 bg-gradient bg-light"> <div class="lh-1 container py-4"> <div class="text-center">All rights reserved © <?= date("Y") ?> - RRS(php)</div> <div class="text-center">Developed by:<a href="mailto:oretnom23@gmail.com" class='text-body-tertiary'>oretnom23</a></div> </div> </footer> <script> $(function(){ }) </script> </body> </html> |
login PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
<?php //require/load the authentication file script require_once('auth.php'); require_once('DBConnection.php'); $page = isset($_GET['page']) ? $_GET['page'] : 'home'; // Generate Login Form Token $_SESSION['formToken']['login'] = password_hash(uniqid(),PASSWORD_DEFAULT); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>LOGIN | Resort Reservation System</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" /> <link rel="stylesheet" href="./css/bootstrap.min.css"> <link rel="stylesheet" href="./css/custom.css"> <script src="./js/jquery-3.6.0.min.js"></script> <script src="./js/popper.min.js"></script> <script src="./js/bootstrap.min.js"></script> <script src="./js/script.js"></script> </head> <body class="bg-dark bg-gradient"> <div class="h-100 d-flex jsutify-content-center align-items-center"> <div class='w-100'> <h3 class="py-5 text-center text-light">Resort Reservation System</h3> <div class="card my-3 col-md-4 offset-md-4"> <div class="card-body"> <!-- Login Form Wrapper --> <form action="" id="login-form"> <input type="hidden" name="formToken" value="<?= $_SESSION['formToken']['login'] ?>"> <center><small>Please enter your credentials.</small></center> <div class="mb-3"> <label for="username" class="control-label">Username</label> <input type="text" id="username" autofocus name="username" class="form-control rounded-0" required> </div> <div class="mb-3"> <label for="password" class="control-label">Password</label> <input type="password" id="password" name="password" class="form-control rounded-0" required> </div> <div class="mb-3 d-flex w-100 justify-content-center align-items-end"> <button class="btn btn-sm btn-primary rounded-0 my-1">Login</button> </div> </form> <!-- Login Form Wrapper --> </div> </div> </div> </div> </body> <script> $(function(){ $('#login-form').submit(function(e){ e.preventDefault(); $('.pop_msg').remove() var _this = $(this) var _el = $('<div>') _el.addClass('pop_msg') _this.find('button').attr('disabled',true) _this.find('button[type="submit"]').text('Loging in...') $.ajax({ url:'./LoginRegistration.php?a=login', method:'POST', data:$(this).serialize(), dataType:'JSON', error:err=>{ console.log(err) _el.addClass('alert alert-danger') _el.text("An error occurred.") _this.prepend(_el) _el.show('slow') _this.find('button').attr('disabled',false) _this.find('button[type="submit"]').text('Save') }, success:function(resp){ if(resp.status == 'success'){ _el.addClass('alert alert-success') setTimeout(() => { location.replace('./'); }, 2000); }else{ _el.addClass('alert alert-danger') } _el.text(resp.msg) _el.hide() _this.prepend(_el) _el.show('slow') _this.find('button').attr('disabled',false) _this.find('button[type="submit"]').text('Save') } }) }) }) </script> </html> |