Created
July 21, 2011 05:19
-
-
Save jondavidjohn/1096543 to your computer and use it in GitHub Desktop.
Gather data from form submission ( Codeigniter )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$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