I'm using HTML function for inserting html content into db table and filter for filtering user inputs against SQL injection attacks. getting output like this prntscr.com/3c8ht . I got following questions:
1) From which functions HTML content needs to be passed before insert and while output? 2) What else for filter function needed or is there any unused function?
Thx in advance
function filter($data, $db)
{
$data = $db->escape_string($data);
$data = htmlspecialchars($data, ENT_IGNORE, 'utf-8');
$data = strip_tags($data);
$data = stripslashes($data);
$data = htmlentities($data);
return $data;
}
function html($data, $db)
{
$data = $db->escape_string($data);
return $data;
}