Best way to filter (validate) data retrieved from a $ _SESSION

2

I am creating a registry and I have a session $_SESSION['usuario']['cpf'] ;

I'm validating the data I get for POST and GET with the filter_input function of PHP. However, the documentation says: INPUT_SESSION (not implemented yet) . In this case. how do I securely validate my data retrieved from a session for a registration?

    
asked by anonymous 14.09.2017 / 16:27

1 answer

1

One of the ways you can use to validate is to use the filter_var .

Just assign the session value to a variable and pass it to the function or pass the session you want to validate directly to the function.

More details here link

    
15.09.2017 / 16:57