Can find user ID with its folder name

This commit is contained in:
Pierre
2017-12-10 11:38:23 +01:00
parent 2a9f0ed1a0
commit d8de0866ae
3 changed files with 75 additions and 0 deletions

View File

@ -102,4 +102,21 @@ function check_string_before_insert($string){
//Success
return true;
}
/**
* Make a string safe to be used to perform a query on a database
*
* @param string $input The string to process
* @return string The result string
*/
function safe_for_sql(string $input) : string {
//Perform safe adapation
$input = str_ireplace("\\", "\\\\", $input);
$input = str_ireplace("'", "\\'", $input);
$input = str_ireplace('"', "\\\"", $input);
return $input;
}