Home PHP Libraries Other libraries PHP form sensitive character filtering class
PHP form sensitive character filtering class
<?php
$_form = new formHtmlFind();
class formHtmlFind{
public function formHtml($array,$infoArray='')
{
if(empty($array))return false;
$newform = null;
$this->infoArray = !empty($infoArray)?$infoArray:array();
$this->array['class'] =  get_class_methods(get_class());
foreach ($array as $key =>$arr)
{
$key = preg_replace("/[^a-z]/i",'',$key);
$newform .= $this->outputForm($arr,$key);
}
return $newform.$this->jsError();
}
private function outputForm($arr,$key)
{
$value = null;
if(empty($arr))return false;
// input Type
$type   = $key;
// input NAME
$name   = trim($arr[0]);

This is a PHP form sensitive character filtering class and its usage. Share it with everyone for your reference.

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

PHP form sensitive character filtering class, PHP form filtering_PHP tutorial PHP form sensitive character filtering class, PHP form filtering_PHP tutorial

13 Jul 2016

PHP form sensitive character filtering class, PHP form filtering. PHP form sensitive character filtering class, PHP form filtering This article describes the PHP form sensitive character filtering class and its usage with examples. Share it with everyone for your reference. The specific analysis is as follows: Copy code

PHP form filtering: HTML tags and special character filtering PHP form filtering: HTML tags and special character filtering

09 Aug 2023

PHP form filtering: HTML tags and special character filtering In web development, forms are an important way for users to interact with the website. However, bad users may abuse the form to submit malicious code, posing a threat to the security of the website. In order to ensure the security of user input data, we need to filter form input. This article will focus on how to use PHP to filter HTML tags and special characters to prevent XSS attacks and other security issues. 1. Filter HTML tags using strip_tags function str

PHP form filtering: sensitive word filtering and replacement PHP form filtering: sensitive word filtering and replacement

09 Aug 2023

PHP form filtering: sensitive word filtering and replacement In the process of developing web applications, we often need to filter and clean the data submitted by users to protect the security of the website and the privacy of the users. Among them, filtering and replacing sensitive words is a very important task. This article will introduce how to use PHP to filter and replace sensitive words, and provide corresponding code examples. The principle of sensitive word filtering and replacement. Sensitive word filtering and replacement refers to detecting sensitive words contained in the data submitted by users and replacing them with specified words.

PHP filter sensitive character class example code PHP filter sensitive character class example code

14 Jul 2017

The so-called sensitive characters refer to articles that contain unhealthy or reactionary information that affects society, and will be regarded as sensitive characters. Because sometimes the sensitive characters entered by the user will invisibly affect the correct execution of the program, the famous database injection attack is to add database control instructions to the query conditions, thereby achieving the attacker's purpose.

PHP form submission special character filtering method PHP form submission special character filtering method

25 Jul 2016

PHP form submission special character filtering method

PHP character filtering class, used to filter data entered by various users_PHP tutorial PHP character filtering class, used to filter data entered by various users_PHP tutorial

21 Jul 2016

PHP character filtering class, used to filter data entered by various users. The detailed code is as follows: Copy code The code is as follows: ?php abstract class Filter { //filter parent class private $blackstr = array(); private $whitestr = array(); function filtit($str) {

See all articles