40 users online (1 members and 39 guests)  


  Results 1 to 3 of 3

Related

  1. Need help with email script    Forum: Website Scripts Forum
    Replies: 0
  2. Email Script    Forum: Website Scripts Forum
    Replies: 4
  3. Please help with email form script    Forum: PHP Forum
    Replies: 1
  4. email script    Forum: CGI Perl Forum
    Replies: 1
  1. #1
    handyman's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2006
    Posts
    3

    Thank you email script

    Send an automatic thankyou email to a person who just filled out a form with there email in it . $ID = uniqid("userID");
    $link = mysql_connect ("localhost", "root", "secret");
    mysql_select_db("secretDB"); mysql_real_escape_string($ID);
    mysql_real_escape_string($link);


    $result = mysql_query ("INSERT INTO users (id, first_name, last_name, h_address, zipcode, h_phone, c_phone, username, userpass, email, comments, web_site)
    VALUES ('$ID', '$first_name', '$last_name', '$h_address', '$zipcode', '$h_phone', '$c_phone', '$username', '$userpass',
    '$email', '$comments', '$web_site' ) ");
    if(!$result)
    {
    echo "<b>User not added:</b> ", mysql_error();
    exit;
    }
    if($result)
    {
    mysql_close($db);
    print "User <b>$username</b> Whose first name is <b>$first_name</b> and last name is <b>$last_name</b> ,with the email <b>$email</b> ,living at <b>$h_address</b><b>$zipcode</b> ,whose home and/or cell phone are <b>$h_phone $c_phone</b> ,with the comments <b>$comments</b> ,and the web site <b>$web_site</b> ,has a password of <b>$userpass</b> ,was added successfully. Thanks for your time!";
    }
    else
    {
    print ("Wrong Password");
    }
    ?>

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: How do I ?

    Assuming you have the mail functions enabled - http://us2.php.net/manual/en/ref.mail.php

  3. #3
    handyman's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2006
    Posts
    3

    Thumbs up Re: How do I ?

    Thanks Deadmeat. Time to study suggestion,have a good php.



Tags for this Thread