I wanted to filter and then put all the values of POST and GET in a variable named after the key so I came up with this code.
foreach($_REQUEST as $key => $value){
$$key = mysql_real_escape_string(htmlspecialchars($value));
}
Then I want to use these variables inside a function? How can I do that?
funciton get_all_posts(){
//return some information from the the new variable
return $username;
return $email;
//return what ever I want to return from POST/GET using the new variables
}
echo get_all_posts();