Hello I have a multidimensional associative array I want to be able to send forward using POST on an html form. I thought this would be a simple matter but I think I am missing something.
here is where i encode the array into json:
$bottomInfoJson=json_encode($bottomInfo);
print_r($bottomInfoJson);
Just to show the json was properly encoded I printed it out and this is what i got:
{
"M1":{"amount":765,"instMrn":"100"},
"M2":{"amount":50,"instMrn":"100"},
"M3":{"amount":770,"instMrn":"100"},
"M4":{"amount":2159,"instMrn":"100"},
"M5":{"amount":145,"instMrn":"100"},
"M6":{"amount":500,"instMrn":"100"},
"M7":{"amount":7507,"instMrn":"100"},
"M8":{"amount":335,"instMrn":"100"},
"M9":{"amount":525,"instMrn":"100"},
"C10":{"amount":130,"instMrn":"100"}}
So I thought I could just pass this on a form simply since it is contained in the php variable...
Here is my form:
<form method='post' action="midMichSummary" enctype='application/json'>
<input type="hidden" name="sdate" value="<?php echo $sdate; ?>"/>
<input type="hidden" name="hbpb" value="<?php echo $hbpb; ?>"/>
<input type="hidden" name="bottomInfoJson" value="<?php echo $bottomInfoJson; ?>" />
<input type="submit" value="Summary->"/>
</form>
Basically all stuff is being passed fine except the json array - using print-r($_POST) at the destination shows me what has been passed...
So I am thinking there may be something additional i need to do to pass this properly - so I am hoping someone can help with this...