1 回答
TA贡献1828条经验 获得超13个赞
<?php
if($_SERVER['REQUEST_METHOD']=='POST')
{
if(($_POST['name']=="") or ($_POST['bumen']=="") or ($_POST['zhiwu']=="") or ($_POST['gongsimingcheng']=="") or ($_POST['dianhua']=="") or ($_POST['chuanzhen']=="") or ($_POST['dizhi']=="") or ($_POST['youbian']=="") or ($_POST['E-mail']==""))
{
print("信息填写完整");
}
else
{
$fp=fopen("reg.txt","a+");
$write="(姓名,部门,职务,公司名称,电话,传真,地址,邮编,E-mail) values ";
$write.="('{$_POST['name']}','{$_POST['bumen']}','{$_POST['zhiwu']}','{$_POST['gongsimingcheng']}','{$_POST['dianhua']}','{$_POST['chuanzhen']}','{$_POST['dizhi']}','{$_POST['youbian']}','{$_POST['E-mail']}')";
fwrite($fp,$write);
fclose($fp);
}
}
?>
<form id="form1" name="form1" method="post">
<p>姓名:<input type="text" name="name">部门:
<input type="text" name="bumen"> 职务:<input type="text" name="zhiwu"></p>
<p>公司名称:<input type="text" name="gongsimingcheng"></p>
<p>电话:<input type="text" name="dianhua"> 传真:<input type="text" name="chuanzhen"></p>
<p>地址:<input type="text" name="dizhi"></p>
<p>邮编:<input type="text" name="youbian"> E-mail:<input type="text" name="E-mail"> </p>
<td width="100%" align="center" colspan="2"><input type="submit" value="马上注册"> <input type="reset" value="全部重写"></td>
</form>
- 1 回答
- 0 关注
- 70 浏览
添加回答
举报