-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmember_check_id.php
More file actions
57 lines (50 loc) · 1.14 KB
/
member_check_id.php
File metadata and controls
57 lines (50 loc) · 1.14 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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&display=swap');
h3 {
padding-left: 5px;
border-left: solid 5px #107aca;
font-family: 'Gowun Dodum', sans-serif;
font-weight: bolder;
}
#close {
margin:20px 0 0 80px;
cursor:pointer;
}
</style>
</head>
<body>
<h3>아이디 중복체크</h3>
<p>
<?php
$id = $_GET["id"];
if(!$id)
{
echo("<li>아이디를 입력해 주세요!</li>");
}
else
{
$con = mysqli_connect("localhost", "user1", "12345", "sample");
$sql = "select * from members where id='$id'";
$result = mysqli_query($con, $sql);
$num_record = mysqli_num_rows($result);
if ($num_record)
{
echo "<li>".$id." 아이디는 중복됩니다.</li>";
echo "<li>다른 아이디를 사용해 주세요!</li>";
}
else
{
echo "<li>".$id." 아이디는 사용 가능합니다.</li>";
}
mysqli_close($con);
}
?>
</p>
<div id="close">
<img src="./img/close.png" width=120px height=35px onclick="javascript:self.close()">
</div>
</body>
</html>