PHP do not parse array input name -
let's have following simple input text box:
<input type="text" name="details[0]->name" value="" /> now problem is, php translating input name array, , ignore rest name after closing square bracket. in print_r, become:
details => array{ [0] => "input" } what can workaround this? there unparsed $_requests?
n.b: if noticed it, yes trying use automatic input class mapper has been done in asp.net mvc.
edit:
the additional solution requirement can read raw array input either get, post or multipart form requests.
for post:
echo urldecode ( file_get_contents('php://input')); for get:
echo urldecode ($_server['query_string']); both above give output details[0]->name=testval
as enctype='multipart/form-data', unparsed data not available in php. however, there solution of sorts given question: get raw post data
Comments
Post a Comment