Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009

    Unanswered: how to save form input in database and email user input at the same time

    Hi everyone

    Can anyone please help out with the following:

    I have a contact form from which I successfully add user input data into my mysql database. I would also like to email this user input data to me (administrator of the website) at the same time when the user clicks (submitting to database) the submit button.

    So when the user click the submit button he adds his details to the database and emails me (administrator) with his registered details (this is for me to know who registered with the website)

    Any help or sample php script would be much appreciated.

    Thank You

  2. #2
    Join Date
    Jun 2007
    Any help or sample php script would be much appreciated.
    Did you try using this tool? I copied the following code from the second site it found. Obviously you'll need to change the text and email addresses. You'll want to put it into your code right after it adds the user to your database.
    $to = "";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "";
    $headers = "From: $from";
    echo "Mail Sent.";
    Last edited by mike_bike_kite; 03-20-09 at 07:23.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts