1,获取表单数据
<INPUT TYPE="text" NAME="myform.email"> //取得数据,Get方式: <?php echo $_GET['myform_email']; ?> //取得数据,Post方式: <?php echo $_POST['myform_email']; ?>
2,取得checkbox复选框中的数据
<form method="POST" action="index.php"> <select name="lunch[]" multiple> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> <option value="d">D</option> <option value="e">E</option> </select> <input type="submit" name="submit"> </form> 您选择的数据为: <br/> <?php foreach ($_POST['lunch'] as $choice) { print "You want a $choice bun. <br/>"; } ?>