Home >Backend Development >PHP Tutorial >多个表单php如何接收post过来的数据呢
多个表单php怎么接收post过来的数据呢
<!DOCTYPE html><br /><head><br /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br /><title>多表单提交</title><br /></head><br /><br /><body><br /> <form action="" method="post"><br /> <table width="500"><br /> <tr><br /> <th>标题</th><br /> <th>作者</th><br /> <th>添加时间</th><br /> </tr><br /> <tr><br /> <td><input type="text" name='title'/></td><br /> <td><input type="text" name='user' /></td><br /> <td><input type="text" name='addtime'/></td> <br /> </tr><br /> <tr><br /> <td><input type="text" name='title' /></td><br /> <td><input type="text" name='user'/></td><br /> <td><input type="text" name='addtime'/></td><br /> </tr><br /> <tr><br /> <td colspan="3" align="center"><br /> <input type="submit" value="提交" /><br /> <input type="reset" value="重置" /><br /> </td><br /> </tr><br /> </table><br /> <br /> </form><br /><br /> <?php<br /> $title=$_POST['title'];<br /> $user=$_POST['user'];<br /> $addtime=time();<br /> echo '<hr>';<br /> echo $title;<br /> echo '<br>'.$user;<br /> echo '<br>'.$addtime;<br /> ?><br /><br /></body><br /></html><br />
<br> <tr> <br> <td><input></td> <br> <td><input></td> <br> <td><input></td> <br> </tr><br> <tr> <br> <td><input></td> <br> <td><input></td> <br> <td><input></td> <br> </tr><br> <tr> <br> <td><input></td> <br> <td><input></td> <br> <td><input></td> <div class="clear"> </div> </tr>