I have a PHP code that actually load the data from a form and then save it as a XML file. It´s needed to setup a rule where accentuation and lowercasse characters are not allowed in the form. In order words, the output XML file attributes elements field need to be filled with UPPERCASE and can NOT BE ACCENTUATED.
Is there a way to set this "rule" into my PHP code??
Even if the final user input lowercase characters and/or accentuation?
Eg. User Input (form field called Name/Address):
Name: John
Address: Ratão
File Output:
<attribute domainname="Name">JOHN</attribute>
<attribute domainname="Address">RATAO</attribute>
PHP Code: (Actual)
$domElement = $domDocument->createElement('attribute', $posted_data['name']);
$domAttribute = $domDocument->createAttribute('domainname');
$domAttribute->value = 'Name';
$domElement = $domDocument->createElement('attribute', $posted_data['address']);
$domAttribute = $domDocument->createAttribute('domainname');
$domAttribute->value = 'Address';