日期:2014-05-16 浏览次数:20538 次
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>多表单提交</title>
</head>
<body>
<form action="" method="post">
<table width="500">
<tr>
<th>标题</th>
<th>作者</th>
<th>添加时间</th>
</tr>
<tr>
<td><input type="text" name='title'/></td>
<td><input type="text" name='user' /></td>
<td><input type="text" name='addtime'/></td>
</tr>
<tr>
<td><input type="text" name='title' /></td>
<td><input type="text" name='user'/></td>
<td><input type="text" name='addtime'/></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" value="提交" />
<input type="reset" value="重置" />
</td>
</tr>
</table>
</form>
<?php
$title=$_POST['title'];
$user=$_POST['user'];
$addtime=time();
echo '<hr>';
echo $title;
echo '<br>'.$user;
echo '<br>'.$addtime;
?>
</body>
</html>
&