Formular_absenden an fix email Adr.und variable Adresse

  • Hallo,
    >
    > Ich will aus dem Formular an der Seite :
    > <!-- m --><a class="postlink" href="http://www.vinyly.ic.cz/form_cz_flashplayer_imagerotator.htm">http://www.vinyly.ic.cz/form_cz_flashpl ... otator.htm</a><!-- m -->
    > an <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e --> (fix email Adresse)
    > und zugleich an eine variable Adresse (nach dem was im Formular
    > Adressfeld wird) die Formulardaten absenden. Ich versuchte es schon durch viele > Kombinationen aber leider nichts hat geholfen.(siehe unten)
    > Vielen Dank fur jede Hilfe im Voraus.
    >
    > Roman
    > ---------------------------------------------------------------------------------------------------------------------
    > Beispiele von Kodes die funktionieren und die nicht funktionieren :
    > <!-- m --><a class="postlink" href="http://www.vinyly.ic.cz/processor.php_unworking_working_script.txt">http://www.vinyly.ic.cz/processor.php_u ... script.txt</a><!-- m -->
    > ------------------------
    > processor.php_unworking_working_script
    > -------------------------------
    >
    > This is an example of UNWORKING script (mail functions are behind each other):
    >
    > <?php
    > $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    > $headers = " text/plain; charset=utf-8\n";
    > mail("vinyl2006@seznam.cz","formular - vinyly.ic.cz");
    > mail($_POST['field'],"formular - vinyly.ic.cz");"Form data:
    > username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] . " Jaký je rok? (Pi�tečíslo): " . $_POST['field_6'] . "
    > powered by PFG.
    > ", $headers);
    > include("confirm.html");
    > ?>
    >
    > or
    >
    > mail(trim($_POST['email']).", <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e -->", "formular - vinyly.ic.cz");"Form data:
    > --------------------------------------------------
    >
    > This is an example of WORKING script (but works only with one email address, either variable or fix one):
    >
    >
    > <?php
    > $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    > $headers = " text/plain; charset=utf-8\n";
    > mail("vinyl2006@seznam.cz"," formular - vinyly.ic.cz","Form data:
    > username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] . " Jaký je rok? (Pi�tečíslo): " . $_POST['field_6'] . "
    > powered by PFG.
    > ", $headers);
    > include("confirm.html");
    > ?>
    >
    > or
    >
    > mail($_POST['field_2'],"formular - vinyly.ic.cz");"Form data:


    -----------------------------------------------------------------------------
    proc.72 - yes (arrived on fix and variable email address, but there is nothing in email message-field)


    <?php
    $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    $headers = "Content-type: text/plain; charset=utf-8\n". "\r\n" ; // not sure you need this header.
    $headers = 'Bcc: <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e -->'; // this would be your permanent email address.
    $to = $_POST['field_2']; // captured from the form.
    $subject = 'formular - vinyly.ic.cz';
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] . " Jaký je rok?;
    (Pište číslo): " . $_POST['field_6'] .
    mail($to, $subject, $message, $headers);
    include("confirm.html");
    ?>

  • I hope that I can use english :-). Otherwise will arrived my answer later, because my german is not good.
    Lets take case nb. 3 (processor 72).


    Below you can see working script. Email arrived on fix and variable email address at the same time but there is nothing in email message field.


    How to set up the script to recieve the words from message field?


    <?php
    $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    $headers = "Content-type: text/plain; charset=utf-8\n". "\r\n" ; // not sure you need this header.
    $headers = 'Bcc: <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e -->'; // this would be your permanent email address.
    $to = $_POST['field_2']; // captured from the form.
    $subject = 'formular - vinyly.ic.cz';
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] . " Jaký je rok?;
    (Pište číslo): " . $_POST['field_6'] .
    mail($to, $subject, $message, $headers);
    include("confirm.html");
    ?>

    Code
  • Hi, my english is not realy great.


    But in this part is somthing wrong.


    Code
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] . " Jaký je rok?; <---- the ; is wrong.
    (Pište číslo): " . $_POST['field_6'] . <-- delet the . and take the ; to this place.


    Maybe is this the problem.


    Greetz TimTim

  • Unten kann man sehen einen Code der funktioniert. Email kommt an fix email Adresse und zugleich an eine variable Adresse ABER das Nachrichtsfeld bleibt leer!


    Was soll ich also im Script andern wenn ich will auch das Nachrichtsfeld im Ordnung haben?


    <?php
    $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    $headers = "Content-type: text/plain; charset=utf-8\n". "\r\n" ;
    $headers = 'Bcc: <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e -->'; // permanent email address.
    $to = $_POST['field_2']; // captured from the form.
    $subject = 'formular - vinyly.ic.cz';
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] . " Jaký je rok?;
    (Pište číslo): " . $_POST['field_6'] .
    mail($to, $subject, $message, $headers);
    include("confirm.html");
    ?>


  • Danke.
    Versuche es bitte noch einmal, jetzt soll es laufen.


    (Pište číslo): heist (Schreiben Sie Nummer):
    Das ist gegen Roboten.


    Ich habe den Code heute auch nur so:


    [code]$message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] .


    gelassen, aber das andert nichts.

  • Zitat von &quot;Basiii&quot;

    Was willst du ?


    Ich versteh nur Bahnhof,


    wenn du einfach E-Mails hier reinkopierst können wir dir weniger helfen, sorry mich^^


    Du meinst, das was ich im Emails hatte, nachdem ich Formular aus der Webseite gesendet hat?

  • Code
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] ;


    try this...

  • Zitat von &quot;timtim&quot;
    Code
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] ;


    try this...


    Der Strichpunkt anstatt den Punkt hinten $_POST['field_5'] ;
    Das versuchte ich leider nicht.
    Du bist ehrlich Doctor!
    Danke schon!

  • Zitat von &quot;timtim&quot;

    Also läuft jetzt alles. Dann ist gut =)




    Greetz Timtim


    Noch eine Frage. Ich versuchte $headers = "Content-type: text/plain; charset=utf-8\n";
    richtig einstellen. Aber leider sind die Zeichen wie ˇ´´šáč schlecht gezeigt (Code.1) oder sie bekommen richtig
    nur an eine Email Adresse (Code. 2).


    Weist du bitte nicht wie kann Mann charset richtig einstellen?


    -------------
    (Code.1)


    proc.126-yes (both emails but wrong text coding-´ˇ ´)


    <?php
    $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    $headers = 'Bcc: <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e -->';
    $to = $_POST['field_2'];
    $subject = 'formular - vinyly.ic.cz';
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . "
    Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] ;
    mail($to, $subject, $message, $headers);
    $headers = "Content-type: text/plain; charset=utf-8\n";
    include("confirm.html");
    ?>


    -------------------------
    (Code. 2)


    proc.124-yes (only emails to <!-- e --><a href="mailto:petr.novak7@centrum.cz">petr.novak7@centrum.cz</a><!-- e --> and corect text coding)


    <?php
    $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
    $headers = 'Bcc: <!-- e --><a href="mailto:vinyl2006@seznam.cz">vinyl2006@seznam.cz</a><!-- e -->';
    $to = $_POST['field_2'];
    $subject = 'formular - vinyly.ic.cz';
    $headers = "Content-type: text/plain; charset=utf-8\n";
    $message = "Form data:
    username: " . $_POST['field_1'] . " Email: " . $_POST['field_2'] . " Telefon: " . $_POST['field_3'] . " Země: " . $_POST['field_4'] . " Zpráva: " . $_POST['field_5'] ;
    mail($to, $subject, $message, $headers);
    include("confirm.html");
    ?>
    -------------------------


    [/code]

  • Hm,


    also bei dir werden die richtigen zeichen angezeigt, und bei allen anderen nicht?


    Kenne mich leider auch nicht mit der ganzen hader geschichte aus.


    Vielleicht hilft ja das:


    Code
    'Content-Type: text/plain; charset="UTF-8"'."\r\n".'Content-transfer-encoding: 8bit\n'



    Sonnst kann ich dir leider auch nicht helfen.



    EDIT:



    Ach..

    code 1.


    das $headers muss über das mail()


    und dann mit .= zu der variable $headers geschrieben werden.


    Greetz TimTim


  • mit


    $headers .= " Content-type: text/plain; charset=utf-8\n";


    Email kommt aber nur an eine (variable) Adresse und sind schlechte Zeichen angezeigt. Da ist schon die Variante Code 2-proc.124-yes (only emails to <!-- e --><a href="mailto:petr.novak7@centrum.cz">petr.novak7@centrum.cz</a><!-- e --> and corect text coding) besser.


    Aber trotzdem danke!


    [/quote][/code]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!