Skip to content

Instantly share code, notes, and snippets.

@saturngod
Created April 6, 2011 02:48
Show Gist options
  • Save saturngod/905039 to your computer and use it in GitHub Desktop.
Save saturngod/905039 to your computer and use it in GitHub Desktop.
check box with form for php
<html>
<head>
<title>checkbox</title>
</head>
<body>
<form action="test.php" method="post">
<input type="checkbox" name="chk[]" value="1"/>Check1<br/>
<input type="checkbox" name="chk[]" value="2"/>Check1<br/>
<input type="checkbox" name="chk[]" value="3"/>Check1<br/>
<input type="submit" value="Submit"/>
</form>
</html>
<?php
print_r($_POST);
//will see chk array
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment