Forum Moderators: coopster
No nothing as advanced as that. My problem is a little more convoluted than the example below but:
Say a user has "produced" a subset of data.
They may want to:
a) Query it further
b) Spell check it
c) Search and replace
d) Flag it for later use
e) Export it
d) Merge it with another record
e) Compare it against another record
etc etc...
Only I have about 30 of these individual functions to somehow attach to my UI. I'd prefer not to keep doing somekind of switch or ifelse statement through a load of potential $_GET variables.
One solution I had thought of was I set one $_POST value with the function name and its arguments seperated by ',' thus:
if ( isset( $_POST["DoFunc"] )) {
list( $func, $args ) = explode( ",", $_POST["DoFunc"] );
call_user_func( $func, $args );
} But this was me just kind thinking laterally and wondered if anyone else has solved this problem in a sweeter way.
asp