- define('__COMPANY' , COMPILE_CODE($_POST['company']));
- define('__POSITION' , COMPILE_CODE($_POST['position']));
- define('__TAX_IDENT', COMPILE_CODE($_POST['tax_ident']));
- define('__SURNAME' , COMPILE_CODE($_POST['surname']));
- define('__FAMILY' , COMPILE_CODE($_POST['family']));
- define('__STREET1' , COMPILE_CODE($_POST['street_nr1']));
- define('__STREET2' , COMPILE_CODE($_POST['street_nr2']));
- define('__COUNTRY' , COMPILE_CODE($_POST['country']));
- define('__ZIP' , COMPILE_CODE($_POST['zip']));
- define('__CITY' , COMPILE_CODE($_POST['city']));
- define('__PHONE' , COMPILE_CODE($_POST['phone']));
- define('__FAX' , COMPILE_CODE($_POST['fax']));
- define('__CELL' , COMPILE_CODE($_POST['cell']));
- define('__EMAIL' , COMPILE_CODE($_POST['email']));
- define('__URL' , COMPILE_CODE($_POST['url']));
-
- // Check for salutation selection
- switch ($_POST['salut'])
- {
- case "M": // Male
- define('__SALUT_M' , " selected");
- define('__SALUT_F' , "");
- define('__SALUT_C' , "");
- break;
-
- case "F": // Female
- define('__SALUT_M' , "");
- define('__SALUT_F' , " selected");
- define('__SALUT_C' , "");
- break;
-
- case "C": // Company
- define('__SALUT_M' , "");
- define('__SALUT_F' , "");
- define('__SALUT_C' , " selected");
- break;
- }
+ foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fix','cell','email','url') as $entry) {
+ $content[$entry] = secureString(postRequestElement($entry));
+ } // END - foreach
+
+ // Init gender
+ foreach (array('m', 'f', 'c') as $gender) {
+ $content['gender_' . $gender] = '';
+ } // END - foreach
+
+ // Check for gender selection
+ $content['gender_' . strtolower(postRequestElement('gender'))] = ' selected="selected"';
+
+ // Init receive selection
+ $content['rec_y'] = '';
+ $content['rec_n'] = '';