Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help needed in mailing the form values

    Hi,
    Am new to PHP. I need help in mailing the values posted by a form. Ok now here is my problem.

    I have a form with almost 50 fields in it. ON clicking the submit button, the values are posted to a information display page where the values are stored in a database. The information display page also echoes the posted variables in a tablefor better viewing. for ex:

    First name : <? echo $_POST['Firstname']; ?>
    Email id : <? echo $_POST['Emailid']; ?>

    Now I need to email all these posted values to my manager from the information display page in the same format. Can any one help me in telling how to do this?

    thanks in advance

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Take a look at http://www.php.net/manual/en/function.mail.php Don't forgot, if you wanna use HTML in the email, include the HTML header.

  • #3
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    HI there,
    Thanks for the link but I still think i havent got it right. I used the example from the pHP manual but it didnt work for me. Here is the code snippet.
    <?
    .
    .
    .
    $message = "Line 1\nLine 2\nLine 3";

    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message = wordwrap($message, 70);

    // Send
    $mailsent=mail('aravind_v21@yahoo.co.in','My Subject', $message);

    if($mailsent)
    echo "AT last";
    else
    echo "What the hell";
    ?>
    I still get the "What the hell" message printed on my page!
    Any idea on what went wrong?

    thanks anyways.


  •  

    Posting Permissions

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