Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Filter{
- private $data = array();
- public function __construct($post){
- $this->data = $post;
- }
- function __get(){
- return (!empty($this->data))? $this->data : print "Ничего!";
- }
- function __set(){
- if(!empty($this->data)){
- foreach($this->data as $name){
- strip_tags($name);
- }
- }
- else{
- print "Всё плохо!\n";
- }
- }
- }
- if(!empty($_POST['go'])){
- $filter = new Filter;
- var_dump($filter->input_filter());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement