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>

 

你可能感兴趣的:(PHP)