NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:php-script-u-funktion:feldinhalt-uebertragen-v1 [2010/07/17 23:35] Knut Heermann (flip-flop) created |
deutsch:phpwcms-system:artikel:contentparts:formular:spezielle-anwendungen:php-script-u-funktion:feldinhalt-uebertragen-v1 [2018/06/03 18:08] (current) |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Feldinhalt übertrag. V1 ====== | ====== Feldinhalt übertrag. V1 ====== | ||
| - | Anhand einer Ortsauswahl soll eine bestimmte E-Mailadresse selektiert und übergeben werden. | + | Anhand einer Ortsauswahl soll eine bestimmte E-Mailadresse selektiert und übergeben werden. Version 01. |
| + | \\ | ||
| ---- | ---- | ||
| Line 69: | Line 70: | ||
| Z.B. | Z.B. | ||
| <code php> | <code php> | ||
| - | if(isset($_POST['email']) AND $_POST['email'] == 'nix') { ... | + | if( isset($_POST['ort']) AND isset($_POST['email']) ) { ... |
| </code> | </code> | ||
| So kann das Formular zumindest rudimentär identifiziert werden. Dies kann bei mehreren Formularen in der Site wichtig sein. | So kann das Formular zumindest rudimentär identifiziert werden. Dies kann bei mehreren Formularen in der Site wichtig sein. | ||
| Line 76: | Line 77: | ||
| Das ist mit einem einfachen preg_replace möglich, je nach Gusto. | Das ist mit einem einfachen preg_replace möglich, je nach Gusto. | ||
| - | <code php |h form_script_email_to_location.php |h> | + | <code php |h form_script_email_to_location_v1.php |h> |
| <?php | <?php | ||
| /** | /** | ||
| ********************************************************************************************* | ********************************************************************************************* | ||
| - | * 13.07.2010 KH: http://planmatrix.de | + | * 13.07.2010 KH: http://planmatrix.de V1 |
| * frontend_init-Script: Manipulating the e-mail address | * frontend_init-Script: Manipulating the e-mail address | ||
| * - Determining the location and email address in form | * - Determining the location and email address in form | ||
| Line 91: | Line 92: | ||
| // ------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------- | ||
| - | if( isset($_POST['ort']) AND $_POST['ort'] == 'nix' ) // The right form? | + | if( isset($_POST['ort']) AND isset($_POST['email']) ) // The right form? |
| { | { | ||
| $email = trim($_POST['email']); | $email = trim($_POST['email']); | ||