Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrey Nikishaev  >  Filter  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Filter
Filter request input data
Author: By
Last change: add some
Date: 6 years ago
Size: 587 bytes
 

Contents

Class file image Download
<?php
include_once('filter_class.php');

Filter::addData(array('GET','POST','COOKIE'));
echo 
Filter::post('phone_var');//get from $_POST filtered by "phone" value of phone_var
echo Filter::get('int_var'); //get from $_GET filtered by "int" value of int_var

/*
How this works:

you send value by post, get or cookie to the server
value name must be in format filterRule_valueName;

after filtration you can get you var by this method
Filter::SendMethod(post,request,get or cookie)('filterRule_valueName');
if var was accepted by filter it return it's value else false.
*/