フォームからデータを取得 – PHP
実装
if (isset($_POST["button"])) {
$txt = $_POST["txt"];
echo $txt;
}
?>
<form method="POST" action="">
<input type="text" name="txt">
<input type="submit" value="送信" name="button">
</form>
環境
- php
if (isset($_POST["button"])) {
$txt = $_POST["txt"];
echo $txt;
}
?>
<form method="POST" action="">
<input type="text" name="txt">
<input type="submit" value="送信" name="button">
</form>