PHP Classes

File: example.php

Recommend this page to a friend!
  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: 15 years ago
Size: 587 bytes


Class file image Download

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.