0% found this document useful (0 votes)
16 views7 pages

Mini Project Template

The document describes developing a simple GUI-based hotel management system database application using XAMPP, MySQL, and HTML. The application allows users to book hotel rooms by entering their details into an HTML form, which then inserts the data into a MySQL database using PHP.

Uploaded by

kumaresangokul23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

Mini Project Template

The document describes developing a simple GUI-based hotel management system database application using XAMPP, MySQL, and HTML. The application allows users to book hotel rooms by entering their details into an HTML form, which then inserts the data into a MySQL database using PHP.

Uploaded by

kumaresangokul23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

DEVELOP A SIMPLE GUI BASED DATABASE APPLICATION

(MINI PROJECT)

AIM:

To develop a simple GUI based database application, ‘HOTEL MANAGEMENT SYSTEM’


using MySQL (database) as a backend and HTML (Webpage) as a frontend connected by XAMPP
Control panel.

HARDWARE REQUIREMENTS:

Windows 10 Pentium processor

SOFTWARE REQUIREMENTS:
● Windows 10

● XAMPP Control Panel

● Notepad++

● Web browser

PROCEDURE:

1. Open notepad++ and type the following HTML code in the new file. Save the file in XAMPP\
HTDOCS.
<html>
<head>
<title>HOTEL MANAGEMENT SYSTEM</title>
</head>
<body>
<form action="System.php">
CUSTOMER NAME:<input type = "text"name="CUSTOMER NAME"><br>
PHONE NUMBER:<input type ="text" name ="PHONE NUMBER"><br>
CITY:<input type ="text" name ="CITY"><br>
NUMBER OF ROOM:<input type ="text" name ="NUMBER OF ROOM"><br>
DATE:<input type ="text" name ="DATE">
<input type="submit"value="BOOK NOW">
</form>
</body>
</html>

2. Create a new file and the type the following PHP code in the file and save it in XAMPP/htdocs.

<?php
$CUSTOMER NAME = $_GET['CUSTOMER NAME'];
$PHONE NUMBER = $_GET['PHONE NUMBER'];
$CITY = $_GET['CITY'];
$NUMBER OF ROOMS = $_GET['NUMBER OF ROOMS'];
$DATE = $_GET['DATE'];

$host = "localhost";
$username = "root";
$password = "";
$database = "student";

$conn = new mysqli($host, $username, $password, $database);


if (!$conn) {
die("Connection failed!");
}

$result = $conn->query("INSERT INTO login VALUES( '$CUSTOMBER NAME',


'$PHONE NUMBER', '$CITY', '$NUMBER OF ROOMS', '$DATE');");
if ($result === TRUE) {
echo "SUCCESSFUL!";
} else {
echo "SOMETHING WENT WRONG!";
}
?>
3.Open the XAMPP control panel and start the Apache and MySQL server.
4. Go the web browser and type localhost/myphpadmin.
5. PHP admin will be opened. Create a database in the server.
6. Create table HOTEL MANAGEMENT SYSTEM Form and insert 6 columns in it.
7. Mention the column names and type of variable used and the size of the variable .The table will be
created.
8. Now go to the form.html and click it. Form designed by us with the desired Requirements will be
given.
9. Fill in the form and give register. If registered, it will return registered successfully, or it will give
try again.
10. If registered successfully, you go to the PHP server in browser, the information will be stored in the
database.
UML DIAGRAMS: (List out all the UML Diagrams with definitions)

USE CASE DIAGRAM (Definition and Diagram)

CLASS DIAGRAM (Definition and Diagram)

ACTIVITY DIAGRAM (Definition and Diagram)

SEQUENCE DIAGRAM (Definition and Diagram)

etc……….
SAMPLE CODE:

Html Code:

<html>
<head>
<title>HOTEL MANAGEMENT SYSTEM</title>
</head>
<body>
<form action="System.php">
CUSTOMER NAME:<input type = "text"name="CUSTOMER NAME"><br>
PHONE NUMBER:<input type ="text" name ="PHONE NUMBER"><br>
CITY:<input type ="text" name ="CITY"><br>
NUMBER OF ROOM:<input type ="text" name ="NUMBER OF ROOM"><br>
DATE:<input type ="text" name ="DATE">
<input type="submit"value="BOOK NOW">
</form>
</body>
</html>

Php Code:

<?php
$CUSTOMER NAME = $_GET['CUSTOMER NAME'];
$PHONE NUMBER = $_GET['PHONE NUMBER'];
$CITY = $_GET['CITY'];
$NUMBER OF ROOMS = $_GET['NUMBER OF ROOMS'];
$DATE = $_GET['DATE'];

$host = "localhost";
$username = "root";
$password = "";
$database = "student";

$conn = new mysqli($host, $username, $password, $database);


if (!$conn) {
die("Connection failed!");
}

$result = $conn->query("INSERT INTO login VALUES( '$CUSTOMBER NAME',


'$PHONE NUMBER', '$CITY', '$NUMBER OF ROOMS', '$DATE');");
if ($result === TRUE) {
echo "SUCCESSFUL!";
} else {
echo "SOMETHING WENT WRONG!";
}
?>

OUTPUT SCREENSHOTS:

MYPHPADMIN:
RESULT:

Thus simple GUI based database application ‘HOTEL MANAGEMENT SYSTEM’ is built by
connecting with the database using MySQL (database) as a backend and HTML (Webpage) as a
frontend successfully.

You might also like