Hi;
I am trying to build a kind of "generic" script that will have a number of different associative arrays (sometimes the number and names of the arrays/variables will change) that I will want to pass to a script (to score the values in various MySQL table columns).
I was trying to mash them all into a single hidden varaible in a form like so:
echo "<input type=\"hidden\" name=\"SENDDATA[COLNAME]\" value=". urlencode(serialize($COLNAME)).">"; // HIDDEN VARIABLE
echo "<input type=\"hidden\" name=\"SENDDATA[ID]\" value=". urlencode(serialize($IDs)).">"; // HIDDEN VARIABLE
echo "<input type=\"hidden\" name=\"SENDDATA[SCHOOLID]\" value=". urlencode(serialize($SCHOOLIDs)).">"; // HIDDEN VARIABLE
echo "<input type=\"hidden\" name=\"SENDDATA[GRADE]\" value=". urlencode(serialize($GRADEs)).">"; // HIDDEN VARIABLE
echo "<input type=\"hidden\" name=\"SENDDATA[ROOM]\" value=". urlencode(serialize($ROOMs)).">"; // HIDDEN VARIABLE
but this does not seem to work.
The script that receives them on the other end....
$SENDDATA = $_POST[SENDDATA]; echo "VARIABLES<br>";
$tempSENDDATA = unserialize(urldecode($SENDDATA));
print_r($tempSENDDATA);
gives me no output other than the echoed word VARIABLES.
Anything OBVIOUSLY wrong here?