Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/top_msg.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/php/process/nl2br/nl2br.php on line 20
Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/top_msg.php' for inclusion (include_path='.:/usr/local/php/7.4/lib/php') in /home/users/2/moriya-h5/web/confrage/php/process/nl2br/nl2br.php on line 20
目次 |
---|
・改行タグ追加 ・サンプルコード ・サンプル |
(php部) <?php // 「送信」ボタンが押された時 if (isset($_POST[btnExec])) { // 改行タグ追加 $memo_br = nl2br($_POST[memo]); print "<table> <tr> <td colspan='2' valign='top'>そのまま表示 : </td> <td>$_POST[memo]</td> </tr> <tr> <td colspan='2' valign='top'>改行コードを追加した場合 : </td> <td>$memo_br</td> </tr> </table>"; } ?> (html部) <form method="post"> <textarea cols="40" rows="6" name="memo"></textarea> <input type="submit" name="btnExec" value="送信"> </form>