Execute PHP on Form Submissions
The OnSubmitServer Attribute
The onSubmitServer attribute can be added to the <forms:form> UI control, to have the form execute a custom PHP function on submission:
Custom PHP functions are usually defined within the PHP tab, located in the SRC view when editing a Page. Where you need to use the PHP function across multiple pages or forms, the function could be added to the website design instead.
Process Form Values with getValues()
The getValues() function can be used to pass form fields to your PHP function. The getValues() function returns an array of all form items, keyed by form item ids or names:
As an alternative to the above getValues() function, the getValuesForComponent() function returns an array of all form items, keyed by the datacolumn attribute.