-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathQRreading_sub.php
More file actions
56 lines (52 loc) · 1.55 KB
/
QRreading_sub.php
File metadata and controls
56 lines (52 loc) · 1.55 KB
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
<?php
//セッションの開始
session_start();
// ニックネーム
$textData = $_SESSION["textData"];
// おすすめのカフェの名前
$textDataName = $_SESSION["textDataName"];
//おすすめのカフェのURL
$textDataURL = $_SESSION["textDataURL"];
// SNSを知らせるか選択
$selectData = $_SESSION["selectData"];
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./css/style.css">
<title>PHP基本トレーニング</title>
</head>
<body>
<form method="POST" action="./QRview.php" id="inputForm">
<form method="POST" action="./QRreuslt.php" id="inputForm1">
<h2>入力したデータ</h2>
<table>
<tr>
<th>テキスト</th>
<th>日付</th>
<th>項目</th>
</tr>
<?php
echo "<tr>";
echo "<td>" . $textData . "</td>";
echo "<td>" . $textDataName . "</td>";
echo "<td>" . $textDataURL . "</td>";
echo "<td>" . $selectData . "</td>";
echo "</tr>";
?>
</table>
<p><input type="submit"></p>
</form>
</body>
</html>
<?php
// 入力データを出力後に、セッションを削除
unset($_SESSION["textData"]);
unset($_SESSION["textDataName"]);
unset($_SESSION["textDataURL"]);
unset($_SESSION["selectData"]);
unset($_SESSION["errorTextData"]);
unset($_SESSION["errortextDataName"]);
unset($_SESSION["errortextDataURL"]);
?>