if( isset($_POST['ort']) AND isset($_POST['ort_email']) ) { ...
This way you can identify the form basically. It will be possibly helpful when more than one form has to be used.
The only step missing is filtering the "place" and assigning it to the variable "$_POST['ort']" und "$_POST['email']". \\
$value) { // --- location|text*domain:tld
$split =preg_split('/\|/', $value, 2); // Cutting out the location
if (trim($split[0]) == $ort) {
$_POST['ort'] = $ort; // assign the location
// Cutting out and assign the eMail
$_POST['email'] = trim(preg_replace('/(.*)\|(.*)\*(.*):(.*)/is','$2@$3.$4', $value));
break;
};
}
} // ---- END if( $_POST['ort']
?>
The right location is passed to the form.
\\
==== Backend: ====
{{:deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:php-script-u-funktion:php_script_und_funktion02_be01_de_1.gif|}}
**[select menu]** Name: **ortsauswahl**
Bitte wählen-|-
Babaorum
Laudanum
Kleinbonum
Aquarium
\\
**[hidden]** Name: **ort_email**
Babaorum|obelix*lokal:arpa#
Laudanum|obelix*lokal:arpa#
Kleinbonum|asterix*lokal:arpa#
Aquarium|idefix*lokal:arpa#
\\
**[hidden]** Name: **ort**
nix
\\
**[e-mail]** Name: **email**
nix
\\
{{:deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:php-script-u-funktion:php_script_und_funktion02_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:ortsauswahl}[B]{LABEL:ortsauswahl}[/B] *[BR]{ortsauswahl}[BR][BR]
{ERROR:kommentar}[B]{LABEL:kommentar}[/B][BR]{kommentar}[BR][BR]
{ERROR:nospam}[B]{LABEL:nospam}[/B] *[BR]{nospam}[BR][BR]
{submitIt}