forked from osohyun0224/NaverConnect_SW_Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign_up.php
118 lines (111 loc) · 3.31 KB
/
sign_up.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>회원가입</title>
<style media="screen">
<style>
* {margin: 0; padding: 0;}
#sign_up_box{
width:400px;
height:150px;
border:solid 2px gray;
position: absolute;
left: 50%; top: 50%;
margin-left: -200px;
margin-top: -100px;
background-color: orange;
}
#sign_up_button{
position: absolute;
left: 40%; top: 80%;
}
</style>
<script>
function check_id(){
var userid = document.getElementById("uid").value;
if(userid)
{
url = "check.php?userid="+userid;
window.open(url,"chkid","width=300,height=100");
}
else{
alert("아이디를 입력하세요");
}
}
function check_nik(){
var usernic = document.getElementById("nic").value;
if(usernic)
{
url = "check.php?usernic="+usernic;
window.open(url,"chkid","width=300,height=100");
}
else{
alert("닉네임을 입력하세요");
}
}
function passwordCheck(){
var pw = document.getElementById("pw").value;
var pw_ck = document.getElementById("pw_ck").value;
var id_ch = document.getElementById("id_ch").value;
var nik_ch = document.getElementById("nik_ch").value;
if (pw=="") {
alert("비밀번호를 입력해주세요.");
}
else if(id_ch==0){
alert("아이디 중복확인을 해주세요");
}
else if(nik_ch==0){
alert("닉네임 중복확인을 해주세요");
}
else if(pw != pw_ck){
alert("비밀번호가 일치하지 않습니다 확인해 주세요.");
}
else{
document.getElementById("sign").submit();
}
}
</script>
</head>
<body>
<div id="sign_up_box">
<form class="" action="sign_up_search.php" method="post" id="sign">
<table>
<tr>
<td>아이디</td>
<td>
<input type="text" name="id" id="uid">
</td>
<td>
<button type="button" name="button" onclick="check_id()">중복확인</button>
<input type="hidden" id="id_ch" name="" value="0">
</td>
</tr>
<tr>
<td>닉네임</td>
<td>
<input type="text" name="name" id="nic">
</td>
<td>
<button type="button" name="button" onclick="check_nik()">중복확인</button>
<input type="hidden" id="nik_ch" name="" value="0">
</td>
</tr>
<tr>
<td>비밀번호</td>
<td>
<input type="password" id="pw" name="passw">
</td>
</tr>
<tr>
<td>비밀번호 확인</td>
<td>
<input type="password" id="pw_ck" name="pass_check">
</td>
</tr>
</table>
<button id="sign_up_button" type="button" name="button" align="right" onclick="passwordCheck()">회원가입</button>
</form>
</div>
</body>
</html>