Skip to content

Instantly share code, notes, and snippets.

@jondavidjohn
Created July 21, 2011 05:19
Show Gist options
  • Save jondavidjohn/1096543 to your computer and use it in GitHub Desktop.
Save jondavidjohn/1096543 to your computer and use it in GitHub Desktop.
Gather data from form submission ( Codeigniter )
<?
$data = array();
foreach($_POST as $key => value)
{
if ( $this->input->post($key) ) // if a value is set
{
$data[$key] = $this->input->post($key, true); //protect against xss
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment