Welcome Guest, Not a member yet? Register   Sign In
get and post filtering for xss, sql injection
#4

Well, if you need to add sth, you can use some classical php functions such as strip_tags  and  preg_replace :

PHP Code:
$name_from_input strip_tags($this->request->getVar('user_name'));
      
$name_to_db 
preg_replace("/[\'\")(;|`,<>]/"""$name_from_input);

$data = [
 
'user_name' => $name_to_db
]; 
Reply


Messages In This Thread
RE: get and post filtering for xss, sql injection - by demyr - 05-16-2021, 11:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB