|
- <?php
- if(isset($_POST["save"])):
- echo "<script>alert('保存しました')</script>";
-
- $name = htmlspecialchars($_POST["name"], ENT_QUOTES);
- $address = htmlspecialchars($_POST["address"], ENT_QUOTES);
- else:
- ?>
- <form action="" method="post">
- <input type="text" name="name" value="<?= $name;?>">
- <input type="text" name="address" value="<?= $address;?>">
- <input type="submit" name="save" value="保存">
- </form>
- <?php
- endif;
- ?>
|