ゆめの学習記録

★職業訓練校修了後の復習用★

3月8日送信フォーム作業データ

##/post.php/##
 
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,
initial- scale=1.0">
<title>post でデータを送信</title>
</head>
<body>
<h1>送信画面</h1>
<form action="output.php" method="post">
<input type="text" name="text">
<input type="submit" value="送信">
</form>
</body>
</html>
 
##/output.php/##
<?php
$text = $_POST['text'];
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,
initial- scale=1.0">
<title>データ受け取り画面</title>
</head>
<body> <h1>データ受け取り画面</h1> <?php
echo $text;
?>
</body>
</html>