-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathforgotPw.php
More file actions
39 lines (28 loc) · 880 Bytes
/
forgotPw.php
File metadata and controls
39 lines (28 loc) · 880 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
39
<?php
$id = $_POST['forgot_id'];
$email = $_POST['forgot_email'];
$answer = $_POST['forgot_answer'];
$con = mysqli_connect("localhost", "root", "tjwjd4921!","login");
$sql = "select * from mem where id='$id' and email='$email' and answer='$answer'";
$result = mysqli_query($con, $sql);
$num_match = mysqli_num_rows($result);
if (!$num_match) //매칭된게 없을 경우
{
echo("
<script>
window.alert('등록되지 않은 아이디입니다!')
history.go(-1)
</script>
");
exit;
}
else{
$row = mysqli_fetch_array($result);
echo("
<script>
console.log('$id');
location.href = 'ForgotRecord.php?option=$id';
</script>
");
}
?>