标签:info set 表单 技术 form 获取 utf-8 http php
<?php header("Content-type: text/html; charset=utf-8"); if ($_POST[‘submit‘] != " "){ echo $_POST[‘user‘]; echo $_POST[‘pwd‘]; echo $_POST[‘sex‘]; echo $_POST[‘select‘]; for ($i=0;$i<count($_POST[‘mrbook‘]);$i++){ echo $_POST[‘mrbook‘][$i]; } echo $_POST[‘file‘]; echo $_POST[‘txt‘]; } ?> <form name="from1" method="post" action=""> <div> 姓名:<input type="text" name="user" value=""> </div> <div> 密码:<input type="password" name="pwd" value=""> </div> <div> 性别: <input type="radio" name="sex" value="男" checked="">男 <input type="radio" name="sex" value="女">女 </div> <div> 学历: <select name="select" id=""> <option value="初中">初中</option> <option value="高中">高中</option> <option value="大学生">大学生</option> </select> </div> <div> 爱好 <input type="checkbox" name="mrbook[]" value="跑步">跑步 <input type="checkbox" name="mrbook[]" value="听歌">听歌 <input type="checkbox" name="mrbook[]" value="看电影">看电影 <input type="checkbox" name="mrbook[]" value="游泳">游泳 </div> <div> 个人照片 <input type="file" name="file" value=""> </div> <div> <div>个人简介</div> <textarea name="txt" id="" cols="30" rows="10"></textarea> </div> <input type="submit" name="submit" value=" 提交"> </form>
标签:info set 表单 技术 form 获取 utf-8 http php
原文地址:https://www.cnblogs.com/myzxh/p/9894830.html