PHP表单处理

<?php
	if(isset($_POST['submit']))
	{
		foreach ($_POST["languages"] as $item) {
			echo "$item<br/>";
		}
	}
?>


<form action="FormDemo.php" method="post">
		<input type="checkbox" value="c#" name="languages[]"/>C#<br/>
		<input type="checkbox" value="java" name="languages[]"/>JAVA<br/>
		<input type="checkbox" value="php" name="languages[]"/>PHP<br/>
		<input type="checkbox" value="sql" name="languages[]"/>SQL<br/>
		<input type="submit" name="submit" value="submit"/>
	</form>

 

posted @ 2014-01-03 22:32  玻璃鱼儿  阅读(144)  评论(0编辑  收藏  举报