コードの全体を載せます。初学者なので色々と汚いです。
_________________________________________ <!DOCTYPE html> <html> <head> <title>textareaのテスト</title> <meta charset='UTF-8'> <meta name=”viewport” content=”width=device-width, initial-scale=1″> </head> <body> <div class='d1'> <div class='d2'> <?php if($_SERVER['REQUEST_METHOD'] === 'POST'){ echo nl2br(htmlspecialchars($_POST['name'])); } ?> </div> <div class='d3'> <form action='' method='post'> <textarea id ='sample' name='name' wrap='physical' cols='30' placeholder='aaaaaa'></textarea> <input type='submit' value='送信'> </form> <style> textarea{ resize: none; min-height: 100px; width: 200px; } </style> </div> </div> </body> </html>
_________________ Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0
|