Skip to content Skip to sidebar Skip to footer

Difference Between Filter_input And Direct Acces On $_post After Objective Ajax Request

I have different results by using filter_input(INPUT_POST, 'attribute') and $_POST['attribute'] and don't know why this happens. The Post-Request is send by a JavaScript build with

Solution 1:

I found the answer deep in the PHP docs. POST is not build to transport deep object. And filter_input method tries to get simple datatypes like string or int. this method does not parse internal so i have to send it as JSON string and decode it or i can't use filter_input in my case.

i took the first and send now strings.

Post a Comment for "Difference Between Filter_input And Direct Acces On $_post After Objective Ajax Request"