PHP表单 接收代码 谁会啊

<title>表单</title><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><s... <title>表单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style>

</style>
</head>
<body>
<div id="layout">
<h2>你是怎么想的?</h2>
<form name="form1" id="form1" method="post" action="">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th >您用过国外化妆品吗?</th>
<td>是
<input name="c1"type="radio" value="yes" />

<input name="c1" type="radio" value="no" /></td>
</tr>
<tr>
<th >您是否订阅化妆品杂志</th>
<td>是
<input name="c2"type="radio" value="yes" />

<input name="c2" type="radio" value="no" /></td>
</tr>
<tr>
<th >是否反对化妆品邮件?</th>
<td><input name="submail" type="checkbox" value="sub" />
是的</td>
</tr>
<tr>
<th >您所从事的行业:</th>
<td> <select name="job">
<option class="l1">-请选择您所从事的行业-</option>
<option class="l2">-IT行业-</option>
<option>设计师</option>
<option>程序员</option>
<option>总监</option>
<option class="l2">-传统行业-</option>
<option>美术编辑</option>
<option>项目经理</option>
</select> </td>
</tr>
<tr>
<th >请留下您的姓名:</th>
<td><input type="text" name="name" class="textInput"/></td>
</tr>
<tr>
<th >请留下您的Email地址:</th>
<td><input name="email" type="text" class="textInput"/></td>
</tr>
<tr>
<th >请留下您的建议:</th>
<td><textarea name="comment" class="textAreaStyle"></textarea></td>
</tr>
</table>
<input type="submit" name="submit" value="提交" class="submitButton"/>
</form>
</div>
</body>
</html
求这段代码的 接收代码 急。。。。
展开
 我来答
架构精进之路
推荐于2016-11-01 · 超过10用户采纳过TA的回答
知道答主
回答量:21
采纳率:0%
帮助的人:17.9万
展开全部
一般不涉及上传文件的form表单最重要的是设置两个参数:method,action
method:提交方式,包括post或get;
action:提交处理表单的目标函数或文件

接收时方式一般与提交对应,$_POST 或 $_GET
注:无论何种方式,$_REQUEST 均可接收,

针对此题接收数据如下:
(参数与前台设置name树形相同即可)
$c1=$_POST['c1'];
$c2=$_POST['c2'];
$submail=$_POST['submail'];
$job=$_POST['job'];
$name=$_POST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
xp12315
2010-09-30 · TA获得超过660个赞
知道小有建树答主
回答量:491
采纳率:0%
帮助的人:461万
展开全部
<?php
echo "<pre>";
print_r($_POST);
?>

就可以看到所有你提交的数据了。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
风清云中子
2010-09-30 · TA获得超过357个赞
知道小有建树答主
回答量:128
采纳率:0%
帮助的人:156万
展开全部
<?php
//直接输出
echo $_POST;
//接受,$符号后跟变量名,变量名自定义。
$c1=$_POST['c1'];
$c2=$_POST['c2'];
$submail=$_POST['submail'];
$job=$_POST['job'];
$name=$_POST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
?>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式