Forum OpenACS Development: Re: Parsing PHP array

Collapse
5: Re: Parsing PHP array (response to 1)
Posted by Torben Brosten on

Iuri,

Perhaps a quick way would be to use q-forms package to convert the array to a tcl array.

Rename the php code that receives the post to php-post-name-2

Put your tcl code in place of the receiving php.

# make a tcl array of posted data (already quoted):

qf_get_inputs_as_array input_array2

# put your code here


# pass the data back to php app via internal redirect:

set query_key_list [array names input_array]
foreach query_key $query_key_list {
    rp_form_put $query_key [ad_urlencode $input_array(${query_key})]
}
rp_internal_redirect /packages/q-wiki/www/example-php-post-name-2
ad_script_abort

cheers,