As far as I can tell, $what is a single variable used throughout the entire program. In almost every script I've looked at, it gets its value from the POST of the referring script, and then sends its value on to another script in POST. (For example, take a look at manageoptions.php.)
Sometimes, $what seems to be the destination page, as the script will send the user to $what.php. But I haven't yet figured out where it's initially defined or what the purpose of any of it is. It's an oddly uninformative name for a variable.