Skip to content

Instantly share code, notes, and snippets.

@notbenh
Created December 1, 2011 07:51
Show Gist options
  • Save notbenh/1414763 to your computer and use it in GitHub Desktop.
Save notbenh/1414763 to your computer and use it in GitHub Desktop.
how to megga-pack form things
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<pre>
<? print_r($_POST); ?>
</pre>
<form action='<? $_SERVER['PHP_SELF'] ?>' method='POST'>
NAME:
<input type='checkbox' name='something[names][]' value='bob'>bob</input>
<input type='checkbox' name='something[names][]' value='ben'>ben</input>
<input type='checkbox' name='something[names][]' value='sam'>sam</input>
<input type='checkbox' name='something[names][]' value='joe'>joe</input>
<input type='checkbox' name='something[names][]' value='nic'>nic</input>
<br>
TEXT:
<input type='text' name='something[text]'></input>
<br>
GENDER:
<select name='something[gender]'>
<option value='w'>female</option>
<option value='m'>male</option>
<option value='t'>trans</option>
<option value='n'>none</option>
</select>
<br>
<input type='submit'>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment