-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjoinpage.php
150 lines (131 loc) · 3.92 KB
/
joinpage.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!DOCTYPE html>
<?php
session_start();
$host = 'localhost';
$user = 'root';
$pw = 'chanki';
$dbname = 'healthcare';
$dbconnection = new mysqli($host, $user, $pw, $dbname);
$dbconnection->set_charset("utf8");
//password 받아온 값을 md5 해쉬화 해서 db랑 비교.
$sql = "select teamname from userinfo where teamname is not null group by teamname ";
$res = $dbconnection ->query($sql);
?>
<head>
<meta charset="utf-8">
<title>회원가입을 환영합니다</title>
<style>
.join-form{
padding : 20px;
background-color: white;
float: left;
width : 33%;
z-index : 1;
border-radius: .4rem;
margin : 15% 33% 0 33%;
}
.join-form input{
width: 99%;
margin: 10px 0px;
border-style: none;
border-bottom : 3px dotted #282C34;
padding: .5rem 0rem .5rem 0rem;
padding-left: 5px;
font-size : 1rem;
outline: none;
}
body{
background-color: #282C34;
}
label{
display: block;
}
.top h2{
background-color: #E0E2E3;
padding: 15px 10px;
border-radius: .4rem;
text-align : center;
}
.join_button input{
background-color: #282C34;
padding: 15px;
border-radius : .4rem;
font-size : 1rem;
color : white;
width :100%;
}
.select-team{
font-style: italic;
border-style: dotted;
border-width: 4px;
}
input[type="radio"] {
display:none;
}
input[type="radio"] + label {
color:black;
font-family:Arial, sans-serif;
}
input[type="radio"] + label span {
display:inline-block;
width:19px;
height:19px;
margin:-2px 10px 0 0;
vertical-align:middle;
background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/check_radio_sheet.png) -38px top no-repeat;
cursor:pointer;
}
input[type="radio"]:checked + label span {
background:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/check_radio_sheet.png) -57px top no-repeat;
}
.director{
margin-top: 10px;
}
</style>
</head>
<body>
<div>
<div class="join-form">
<div class="top">
<h2>HealthCare에 가입하기</h2>
</div>
<form name="login" method="post" action="join.php">
<div class="join-email">
<label for="email"><b>Email</b></label>
<input type="email" name ="email" placeholder="아이디로 쓸 이메일">
</div>
<div class="join-password">
<label for="password"><b>Password</b></label>
<input type="password" name="password" placeholder="비밀번호를 입력해주세요">
</div>
<div class="join-name">
<label for="userName"><b>이름</b></label>
<input type="text" name="userName" placeholder="본인의 이름을 입력하세요.">
<div class="joinTeamName">
<label for="userName"><b>팀 이름</b></label>
<input type="text" name="teamName" placeholder="본인이 속한 팀의 이름을 입력하세요.">
<div class="select-team">
<b>존재하는 팀 목록입니다.</b> <br>
<?php
while ($row = mysqli_fetch_row($res)) {
echo " "; echo $row[0]; echo ",";
}
?>
</div>
<div class="director">
<input type="radio" id="r1" name="director" value="true" />
<label for="r1"><span></span>감독입니다.</label>
<p>
<input type="radio" id="r2" name="director" checked="checked" value="false" />
<label for="r2"><span></span>일반 사용자입니다. </label>
</div>
<div class="join_button">
<input type="submit" name="Join-button">
<input type="reset" name="reset-button">
</div>
</form>
</div>
</div>
</div>
</body>
</html>