-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbooking4.php
More file actions
85 lines (79 loc) · 2.92 KB
/
booking4.php
File metadata and controls
85 lines (79 loc) · 2.92 KB
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
<?php
$datedata = $_POST["dated"];
$themadata = $_POST["themad"];
$timedata = $_POST["timed"];
$namedata = $_POST["named"];
$membernumberdata = $_POST["membernumberd"];
$phonenumber1data = $_POST["phonenumber1d"];
$phonenumber2data = $_POST["phonenumber2d"];
$bookingnumberdata = $_POST["bookingnumberd"];
$con = mysqli_connect("localhost", "jinhui0131", "tlswlsgml1", "jinhui0131") or die("데이터베이스 접속 실패 !!");
$sql1 = "SELECT* FROM CUSTOMER WHERE user_bookingnumber='$bookingnumberdata' ";
$ret1 = mysqli_query($con, $sql1);
$row = mysqli_fetch_array($ret1);
if($row)
{
$msg = "이미 예약되어 있습니다.";
}
else
{
$msg = "예약이 완료되었습니다.";
$sql = "INSERT INTO CUSTOMER VALUES
('$namedata', '$themadata', '$datedata', '$timedata', '$membernumberdata', '$phonenumber1data', '$phonenumber2data', '$bookingnumberdata')";
$ret = mysqli_query($con, $sql);
}
mysqli_close($con);
?>
<script>
alert("<?php echo $msg ?>");
</script>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>웹프로젝트</title>
<link rel="stylesheet" href="css/booking4.css">
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/booking4.js"></script>
</head>
<body>
<div id="container">
<header>
<a href="main_display.php"><img id="logotype" src="images/main_logo.JPG" alt="메인로고"></a>
<ul>
<li><a href="reason.html">reason</a></li>
<li><a href="notice.html">notice</a></li>
<li><a href="rooms.html">rooms</a></li>
<li><a href="booking.html">booking</a></li>
<li><a href="check booking.html">check booking</a></li>
<li><a href="q&a.html">q&a</a></li>
</ul>
</header>
<section>
<div id="firstarticle">
<h2>예약하기 <span id="smalltext">(booking)</span></h2>
<img src="images/booking4_picture.gif" style="margin-bottom:30px">
</div>
<div id="secondarticle">
<table cellspacing="0" style="text-align:center;">
<tr>
<td style="font-size:50px"><?php echo $msg ?></td>
</tr>
<tr>
<td><input type="button" onclick="firstbookingpage();" value="확인" class="buttontype"></td>
</tr>
</table>
</div>
</section>
<footer>
<ul>
<li>주소 : 공주대학교 천안공과대학 8층</li>
<li>대표 : 손원주</li>
<li>전화번호 : 010-5157-9214</li>
<li>이메일 : sonwonjoo@naver.com</li>
<li>Copyright ⓒ REASON All Right Reserved</li>
</ul>
</footer>
</div>
</body>
</html>