0
There is how to identify the type of field that is coming in a post?
Whether it’s Text or Array?
Example:
I have listbox (select Multiple) and text fields in html, and in it the user may or may not select values, I have a function where I check the values of the fields before proceeding, but when I have this type of field in the middle of the problem, I needed to treat it differently when it comes in the post.
You can use
is_array($_POST["nome_do_campo"]);
. Returningtrue
, is a array.– Valdeir Psr