How Does One Create A Automatic Responder Using Php & Mysql?

December 22nd, 2009 by CTO WebOjO.com website designers Lahore Pakistan Leave a reply »

I have just created a PHP & mySQL registration form, but I want people who sign up to recieve an automatic email saying welcome etc. How do I set this up?

Advertisement

2 comments

  1. jdorndog says:

    You would use the php mail() function.
    < ?php
    $to = $_REQUEST['email'];
    $subject = 'Welcome';
    $message = wordwrap('Welcome to the site',70);
    $headers = 'From: webmaster@example.com‘ . “rn” .
    ‘Reply-To:
    webmaster@example.com‘;
    mail($to, $subject, $message, $headers);
    ?>

  2. De Aragon says:

    $email = $_POST['email'];
    $username = $_POST['username'];
    mail($email, ‘Welcome’, ‘Hello’.$username.’, welcome to website.tld’);