-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddroom.php
57 lines (48 loc) · 1.62 KB
/
addroom.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
<?php
include('connection.php');
$room=$_POST['roomname'];
$type=$_POST['type'];
$capacity=$_POST['capacity'];
// Create connection
$conn = new mysqli("localhost", "root", "hitesh_1995", "Mini");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql="INSERT INTO ROOMS Values('$room','$type','$capacity')";
echo'
<html>
<head>
<title>Room details</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PRATAP</title>
<meta name="description" content="Creative Link Effects: Subtle and modern effects for links or menu items" />
<meta name="keywords" content="link effect, css transition, style, inspiration, css3, menu item, web design" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div class="container">
<header>
<h1>WELCOME: <i>ADMIN</i></h1>
</header>
<section style="padding: 0px"class="color-1">
<nav class="cl-effect-4">
<a href="myprofile.php" data-hover="CLICK HERE"><span>HOME</span></a>
<a href="logout.php" data-hover="CLICK "><span>LOGOUT</span></a>
</nav>
</section>';
if ($conn->query($sql) === TRUE) {
echo "room added";
}
else {
echo "error";
}
$conn->close();
?>