if( isset($_POST['ort']) AND isset($_POST['email']) ) { ...
Thus, the form will be identified at least rudimentary. This is important when multiple forms are used on the site..
The last step is to restrict the location and assignment to the variable "$_POST['ort']". \\
This is possible with a simple preg_replace.
(.*)/is','$1', $email); // Cutting out the location
$_POST['email'] = preg_replace('/\<(.*)\>(.*)/is','$2', $email); //Only for completeness. Is not necessarily needed
} // ---- END if( $_POST['ort']
?>
The right location is passed to the form.
For testing have a look in the forms PHP function into the variable "$postvar['ort']. The text "Laudanum" will be entered there. Thus, this text is taken over in the text of the outbound email for the placeholder "{ort}".
\\
==== Backend: ====
{{:deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:php_script_und_funktion_be01_de_1.gif|}}
**[select email menu]** Name: **email**
Bitte wählen -|-
Babaorum -|- obelix@lokal.arpa
Laudanum -|- obelix@lokal.arpa
Kleinbonum -|- asterix@lokal.arpa
Aquarium -|- idefix@lokal.arpa
\\
{{:deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:php_script_und_funktion_be02_de_1.gif|}}
**recipient - template:**
Hallo {anrede} {name},
E-Mail: {email}
Ort: {ort}
Kommentar:
------------------------------
{kommentar}
------------------------------
Das war alles - Danke.
**template:**
{ERROR:anrede}[B]{LABEL:anrede}[/B] *[BR]{anrede}[BR][BR]
{ERROR:name}[B]{LABEL:name}[/B] *[BR]{name}[BR][BR]
{ERROR:email}[B]{LABEL:email}[/B] *[BR]{email}[BR][BR]
{ERROR:kommentar}[B]{LABEL:kommentar}[/B][BR]{kommentar}[BR][BR]
{ERROR:nospam}[B]{LABEL:nospam}[/B] *[BR]{nospam}[BR][BR]
{submitIt}