21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
#接收form内容并进行处理
if(isset($_GET['goods_id'])){
echo $id = $_GET['goods_id']; //此处用GET获取连接后的参数
print_r($_POST); //表单中的method指定的传输方式,在提交后作为全局数组,$_POST即表单数据
}
?>
<!--form中的action指向php接收数据的页面,包括参数,或由php动态指定参数值:goods_id=<?=$goods_id?>-->
<form name="form" method="post" action="http://www.xxxxx.com.cn/goods.php?goods_id=183">
<input type="text" name="name1" value="<?=$array['bid']['id']?>"/> <!--此处为php在html中的输出-->
<input type="text" name="name1" value="1"/>
<input type="button" name="submit" value="submit"/> <!--此处提交表单数据-->
</form>