Jump to content

PHP auto responder.


postonoh

Recommended Posts

Html code

<div id="feedback">
          <p class="error wrong_name"> Fill the correct name</p>
          <p class="error wrong_email"> Incorrect email</p>
          <p class="error wrong_message"> Enter your message</p>
        </div>
        <form action="sendemail.php" id="contact_us" method="post">
          <p class="label_name">Name</p>
          <p class="input_form">
            <input type="text" name="Name" width="20"/>
          </p>
          <p class="label_name">Email</p>
          <p class="input_form">
            <input type="text" name="Email" />
          </p>
          <p class="label_name">Message</p>
          <p class="input_form" id="textarea">
            <textarea name="Message" rows="5" cols="4" id="message_input"></textarea>
          </p>
          <p id="submit">
            <input type="submit" value="Send" name="submitButton" class="button" />
          </p>
        </form>
        <p id="success">Your message was sent succesfully!</p>

 

 

 

 

Php code

<?php
$mailTo = 'vmoore@minoritybiz.org';
$name = htmlspecialchars($_POST['Name']);
$mailFrom = htmlspecialchars($_POST['Email']);
$subject = 'Information Request';
$message_text = htmlspecialchars($_POST['Message']);

$message =  'From: '.$name.'; Email: '.$mailFrom.' ; Message: '.$message_text;

mail($mailTo, $subject, $message);

?>

 

this works  real simple I would like to add a auto respond to the person click the submit button.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.