You aren't calling the function directly though, you are reloading the page which triggers the function call, that is what v1rgil meant.
You'd still be better off using an array of allowed functions.
PHP Code:
$strFunctionName = $_GET['func'];
$arrAllowedFunctions = array('function1', 'function2', 'function3');
if (in_array($strFunctionName, $arrAllowedFunctions)) {
$strFunctionName();
} else {
default();
}//if
function default () {
//dosomething
}//function
function function1 () {
//dosomething
}//function
function function2 () {
//dosomething
}//function
Bookmarks