Jump to content

PHP auto email response


kathleencook88

Recommended Posts

Hello,

 

Basically I would like to have an auto email response after someone fills out my HTML form so that I can provide them with a special link to their given email address.

 

I have managed to get the data they enter in my form sent to my email address, I just can’t figure out for the life of me how to send an automatic email message to their email address.

 

Below is the PHP script I’m using with my form. If someone could please provide me with the rest of the script I need so that an automatic email message can be sent, it would be greatly appreciated!

 

Please note I’m very new to PHP 

 

<?php

$name = $_POST['name'];

$email = $_POST['email'];

$phone = $_POST['phone'];

$postcode = $_POST['postcode'];

 

$message = "Name: $name \n";

$message .= "Phone: $phone \n";

$message .= "Postcode: $postcode \n";

 

mail('something@something.com', 'Feedback From Results', $message, 'From: ' . $email);

header( "Location: http://something.html" );

?>

 

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.