#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Dublin, Ireland
    Posts
    9
    Rep Power
    0
    Guy's
    I have this FlashPHP mailform, and it works really well. The question is how do I amend the script below to send a confirmation mail to the sender?? I'm not at all experienced with PHP so I thought I should ask people who are. Any helpguidance appreciated. Thanks..


    /****Here are the only two variables, that need to be defined.****/

    /*How many times at a stretch visitor can send mail using that script (2 times default)*/
    $opss = 2;

    /*And after what amount of time allow that visitor to send mail again (1 hour default)*/
    $ok = 3600;

    /************ You may leave all the rest without changes ********/

    $php_header = "From: $name <$from>n".
    "X-Mailer: Testguy";
    $antispam = $HTTP_COOKIE_VARS["times"];
    $message_tosent=$message."nn send by $REMOTE_ADDR.";
    if ($antispam < $opss){
    setcookie("times",$antispam+1,gmdate(time()) +$ok);
    if (@Mail($to,
    $subject,
    $message_tosent,
    $php_header)){
    echo "&info=Mail sent. Thank you.&";
    }else{
    echo "&info=Error. Please try later.&";
    }
    }
    else{
    echo "&info=Sorry. Spamming not allowed here.&";
    }
    ?>

  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4476
    $confirm_to = $name . "<$from>";
    $confirm_header = "From: Webmaster<webmaster@yourdomain.com>";
    $confirm_message = "Your message has been sent. nTo: $tonSubject: $subjectn";
    $confirm_subject = "Email Confirmation";

    @mail($confirm_to,$confirm_subject,$confirm_message,$confirm_header);

    Hope that works...

    ---John Holmes...

    [This message has been edited by SepodatiCreations (edited July 19, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Dublin, Ireland
    Posts
    9
    Rep Power
    0
    Wow, thank's for your speedy response, John. I'll try it out and let you know how I got on....
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Dublin, Ireland
    Posts
    9
    Rep Power
    0
    Yup, It works a treat!. Thanks again for taking the time to help out.. BTW, if any body needs the complete Flash source, just mail me.

Similar Threads

  1. PHP MySQL question
    By spookymark in forum PHP Development
    Replies: 1
    Last Post: February 17th, 2004, 12:07 AM
  2. PHP and Table Relationship question
    By spank in forum PHP Development
    Replies: 4
    Last Post: February 9th, 2004, 08:24 PM
  3. SSL & PHP together question?
    By asedesigns in forum Apache Development
    Replies: 1
    Last Post: February 7th, 2004, 09:35 PM
  4. PHP Mailing list Question
    By byte me in forum PHP Development
    Replies: 3
    Last Post: January 23rd, 2004, 06:55 AM
  5. Php + Flash Question
    By ORANGE900 in forum PHP Development
    Replies: 0
    Last Post: January 23rd, 2004, 01:23 AM

IMN logo majestic logo threadwatch logo seochat tools logo