龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

post 网页提交textarea文本框数据到php后端代码范例

时间:2014-09-01 02:49来源:网络整理 作者:网络 点击:
分享到:
网页提交textarea文本框数据到php后端代码范例 html代码 [代码片段(19行)]

html代码

<html>
<head>
<title>A simple HTML form from www.outofmemory.cn(脚本分享网)</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>

精彩图集

赞助商链接