How to filter $_POST['cropData']["width"] with filter_input

Asked

Viewed 35 times

0

I’m trying to filter using this filter,

filter_input(INPUT_POST, 'cropData[width]', FILTER_VALIDATE_INT);

but nothing returns.

  • What this filter should return?

  • Value of the width of an image

  • tried to give a var_dump() there in that expression to see?

  • @Gabriel, this variable is an array ??

  • @Olive tree yes, and an array

  • @Gabriel, put the passage that you assign the value to this variable!!

  • @Oliveira, and by javascript , he makes _POST with the values to change the dimensions of an image ; example _POST cropData[x]: 0 cropData[y]: 5 cropData[width]: 431 cropData[height]: 324

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.