-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.php
69 lines (65 loc) · 1.56 KB
/
check.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PHP基礎</title>
</head>
<body>
<?php
$nickname=$_POST['nickname'];
$email=$_POST['email'];
$goiken=$_POST['goiken'];
$nickname=htmlspecialchars($nickname);
$email=htmlspecialchars($email);
$goiken=htmlspecialchars($goiken);
if($nickname=='')
{
print 'ニックネームが入力されていません。<br />';
}
else
{
print 'ようこそ';
print $nickname;
print '様';
print '<br />';
}
if($email=='')
{
print 'メールアドレスが入力されていません。<br />';
}
else
{
print 'メールアドレス:';
print $email;
print '<br />';
}
if($goiken=='')
{
print 'ご意見が入力されていません。<br />';
}
else
{
print 'ご意見「';
print $goiken;
print '」';
print '<br />';
}
if($nickname==''||$email==''||$goiken=='')
{
print '<form>';
print '<input type="button" onclick="history.back()" value="戻る">';
print '</form>';
}
else
{
print '<form method="post" action="thanks.php">';
print '<input name="nickname" type="hidden" value="'.$nickname.'">';
print '<input name="email" type="hidden" value="'.$email.'">';
print '<input name="goiken" type="hidden" value="'.$goiken.'">';
print '<input type="button" onclick="history.back()" value="戻る">';
print '<input type="submit" value="OK">';
print '</form>';
}
?>
</body>
</html>