You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Scripted/WEB/Config/Nettoyage.php

27 lines
707 B

<?php
Class Nettoyage{
public function clean($input)
{
// Supprime les espaces en début et fin de chaîne
$output = trim($input);
// Supprime les balises HTML
$output = strip_tags($output);
// Supprime les caractères spéciaux
// $output = htmlspecialchars($output);
return $output;
}
public function cleanEmail($input){
$output = $this->clean($input);
$output = filter_var($output, FILTER_SANITIZE_EMAIL);
return $output;
}
public function cleanInt($input){
$output = $this->clean($input);
$output = filter_var($output, FILTER_SANITIZE_NUMBER_INT);
return $output;
}
}