Page 1 of 1

default type of data in $_POST array?

Posted: Sun Nov 27, 2011 12:48 am
by Markto
If I get some numbers (like 1234) in a $_POST variable (like $_POST['postdata']) through a form field that could collect any character, does the data in $_POST['postdata'] have a default character type? Is it a string, or an integer? (Could it be boolean if I put in "true" or "false" into the field?)

I just want to know if all post data's type is a string or if it depends on what the user entered. I know I can set the type, but I want to know what the default type is.

Re: default type of data in $_POST array?

Posted: Sun Nov 27, 2011 1:52 am
by twinedev
All values are assigned as strings. To verify this, you can do var_dump($_POST);

-Greg