-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjoin.php
More file actions
38 lines (31 loc) · 685 Bytes
/
Copy pathjoin.php
File metadata and controls
38 lines (31 loc) · 685 Bytes
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<?php
//DB에 받은 정보 저장
$connect = mysqli_connect('localhost', 'tnwjd4623', '1q2w3e4r', 'tnwjd4623') or die("fail");
$id=$_GET[id];
$pw=$_GET[pw];
$email=$_GET[email];
$date = date('Y-m-d H:i:s');
$URL = "./main.php";
$query = "insert into member (id, pw, mail, date, permit) values('$id', '$pw', '$email', '$date', 0)";
$result = $connect->query($query);
if($result) {
?> <script>
alert('가입 되었습니다.');
location.replace("<?php echo $URL?>");
</script>
<?php }
else{
?> <script>
alert("fail");
</script>
<?php }
mysqli_close($connect);
?>
</body>
</html>