The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Email auto reply

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #36696
    Ricardo C.

    How would I code an auto reply to a form? In php and or javascript?


    Once you have validated the form and stored the results you would call mail()

    Assuming your have already taken the users $_POST variable, validated it and stored it as $email further up the script then ….

    $to = $email;
    $subject = 'Form submission at';
    $message = 'This is an auto generated response from www.yoursite.comrnrnThank you for your submission.rn';
    $headers = 'From: [email protected]' . "rn" .
    'Reply-To: [email protected]';

    mail($to, $subject, $message, $headers);

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.