Welcome Guest, Not a member yet? Register   Sign In
How to Sanitize data in FilterInterface CI4
#2

PHP Code:
// Check to see if the variable is an integer
if (filter_var($this->request->getVar('number_only'), FILTER_VALIDATE_INT) === false)
{
    // ERROR!  
}
else
{
    echo $this->request->getVar('number_only');

What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How to Sanitize data in FilterInterface CI4 - by InsiteFX - 10-20-2020, 01:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB