diff --git a/docker-compose.yml b/docker-compose.yml
index c82db33..264598f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,4 +7,24 @@ services:
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
- # (this is just an example, not intended to be a production configuration)
+ MYSQL_DATABASE: hotel_booking
+ MYSQL_USER: db_user
+ MYSQL_PASSWORD: db_user_pass
+ ports:
+ - "3306:3306"
+ volumes:
+ - ./dbdata:/var/lib/mysql
+ phpmyadmin:
+ image: phpmyadmin/phpmyadmin
+ container_name: pma
+ links:
+ - db
+ environment:
+ PMA_HOST: db
+ PMA_PORT: 3306
+ PMA_ARBITRARY: 1
+ restart: always
+ ports:
+ - 8081:80
+volumes:
+ dbdata:
\ No newline at end of file
diff --git a/hotel_booking/.gitignore b/hotel_booking/.gitignore
index 2c31100..8c75199 100644
--- a/hotel_booking/.gitignore
+++ b/hotel_booking/.gitignore
@@ -1 +1,2 @@
-images/*
\ No newline at end of file
+images/*
+admin/components/db_config.php
\ No newline at end of file
diff --git a/hotel_booking/admin/components/utils.php b/hotel_booking/admin/components/utils.php
new file mode 100644
index 0000000..3b13e61
--- /dev/null
+++ b/hotel_booking/admin/components/utils.php
@@ -0,0 +1,29 @@
+
+ window.location.href='index.php';
+ ";
+ }
+ session_regenerate_id(true);
+ }
+
+ function redirect($url){
+ echo"";
+ }
+
+ function alert($type, $msg){
+ $bs_class = ($type == "success") ? "alert-success" : "alert-danger";
+ echo <<
+ $msg
+
+
+ alert;
+ }
+
+?>
\ No newline at end of file
diff --git a/hotel_booking/admin/dashboard.php b/hotel_booking/admin/dashboard.php
new file mode 100644
index 0000000..46f1017
--- /dev/null
+++ b/hotel_booking/admin/dashboard.php
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ Admin Dashboard | Midtown Hotel
+
+
+
+
+
+
Admin Dashboard
+
Logout
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hotel_booking/admin/index.php b/hotel_booking/admin/index.php
index 5c42cf8..d155457 100644
--- a/hotel_booking/admin/index.php
+++ b/hotel_booking/admin/index.php
@@ -1,7 +1,11 @@
@@ -9,7 +13,7 @@
Admin Login Panel | Midtown Hotel
-
+
+ num_rows==1){
+ $row = mysqli_fetch_assoc($res);
+ $_SESSION['adminLogin'] = true;
+ $_SESSION['adminId'] = $row['sr_no'];
+ redirect('dashboard.php');
+ } else{
+ alert('error', 'Invalid credentials!');
+ }
+ }
+ ?>
-
+