Your best friend for file transfer.

Fetch application logoFetch

question about email form with php coding (2 posts)

  • Started 3 years ago by Francine Houston
  • Latest reply 3 years ago from Scott McGuire
  • Francine Houston Member

    I created a email form with php coding. The submit button does not submit however it goes to the code I written for the form. I am going to show you the code for it when I press the submit button. Could you help or would I have to speak the web hosting people?

    <?php

    /"Subject and Email Variables"/

    $emailSubject = 'mMemo to Ms. Stokes!';
    $webMaster =' stokessheryl@gmail.com';

    /'Gathering Data Variables'/

    $nameField = $_POST['name'];
    $emailField = $_POST['email'];
    $messageField =$_POST['message'];

    $body = <<<EOD
    Name: $name

    <hr>
    Email: $email
    Message: $message
    EOD;

    $headers = "From: $email\r\n";
    $header .= "Content-type: text/html\r\n";
    $success = mail{$webMaster, $emailSubject,$body,$headers};

    / * Results rendered as HTML*/

    $theResults = <<<EOD
    <html>
    <head>
    <title>Thank you!</title>
    <!-- define some style elements-->
    <style>
    h1
    {
    font-family : Arial, Helvetica, sans-serif;
    font-size : 16px;
    font-weight : bold;
    }
    label,a,body
    {
    font-family : Arial, Helvetica, sans-serif;
    font-size : 12px;
    }

    </style>
    <!-- a helper script for vaidating the form-->
    </head>
    </head>

    <body>
    <h1>Thank you!</h1>
    Thank you for submitting the form. We will contact you soon!

    </body>
    </html>
    EOD;
    echo "$theResults";

    ?>

    ?>

    Posted 3 years ago #

  • Scott McGuire Administrator

    Hi Francine,

    No, sorry, this is not something we can help with - we're not PHP experts, and problems with form submission are not related to Fetch, they're related to the code or the server.

    Best,

    Scott McGuire
    Fetch Softworks

    Posted 3 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.