网页提交textarea文本框数据到php后端代码范例,修改时注意修改表达的action和后端php网页的地址
html代码
<html> <head> <title>A simple HTML form from www.75271.com(脚本分享网)</title> </head> <body> <form action="form.php" method="GET"> <input type="text" name="user"> <br /> <textarea name="address" rows="5" cols="40"> </textarea> <br /> <input type="submit" value="go"> </form> </body> </html>
php后端代码,保存为form.php
<html> <head> <title>Reading textarea from form</title> </head> <body> <?php print "Welcome <b>$_POST['user']</b><p>\n\n"; print "Your address is:<p>\n\n<b>$_POST['address']</b>"; ?> </body> </html>