Add common function getRequestID() to obtain id from POST/GET
variables and check for valid number/identifier characters.
Also uniformize error handling for missing id's.