I am trying to save an array (either associative or 2 arrays) to the settings of my extension. I am able to save one array (called member fields) correctly, but I cannot get the array or arrays for my lists to save. I am using a different type of data input because of what I want from the user, textboxes instead of drop downs. I can’t seem to echo out the $_POST to see what data I am actually send in and if it is right. The page goes blank on me if I try. I would appreciate any help or pointers about saving settings for an extension.
kmertig
I don’t have an immediately solution for you.
However, when I need to see what is going on in a specific spot in the code I do this:
print_r($variable); exit();
With $variable being an array or variable that contains data for me to look at.
So if you want to see the $_POST data you could do:
print_r($_POST); exit();
Though the fact that you are looking at $_POST is giving me a hint that maybe you don’t know about:
$IN->GBL('key_value');
It works similarly to $_POST. Just call $IN in your function the same way you do $DB or the others and then put the field name where key_value is and you shoudl get the contents of that field.
Jamie
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.