Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function _getPosts(){
- if(!(!isset($_POST) || count($_POST) == 0)){
- foreach($_POST as $key=>&$post){
- $this->posts[$key] = $this->_mres($post); //escape all randomness
- }
- }
- }
- protected function _mres($q) {
- if(is_array($q)) {
- foreach($q as $k => $v) {
- $q[$k] = $this->_mres($v); //recurse into array
- }
- }
- elseif(is_string($q)) {
- $q = mysql_real_escape_string($q);
- }
- return $q;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement