29 users online (1 members and 28 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 1
  2. Replies: 4
  3. Replies: 1
  4. Form Handling Script for 'Tell A Friend' Form    Forum: Javascript Forum
    Replies: 1
  5. Replies: 3
  1. #1
    bufhal's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Apr 2006
    Posts
    32

    help with another form, please

    Hi,
    Hope someone can offer a bit of assistance.
    I have a contact.html form page which posts the filled in fields to the page below, thankyou.php. I need the results to go to a Lotus email database called mkt as well.
    Can someone show me how to post to the email account with the working code below? I appreciate any help.
    PHP Code:
    <?php
    session_cache_limiter
    ('nocache'); 
    session_start();
    include 
    "subs.php";
    Print_header ("Get Password","",0);
    ?>
    <br><center><h1>Thank You!</h1></center><br>
    <TABLE border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
    <TR>
    <TD width=600><BR>
    <BR><b></b><center>
    <? 
    echo $_POST['Realname'];
    ?>
    <br> 
    <?
    echo $_POST['Username'];
    ?>
    <br>
    <?
    echo $_POST['Title'];
    ?>
    <br> 
    <?
    echo $_POST['Company']; 
    ?>
    <br>
    <?
    echo $_POST['Dept']; 
    ?>
    <br>
    <?
    echo $_POST['Address']; 
    ?>
    <br>
    <?
    echo $_POST['City']; 
    ?>
    <br>
    <?
    echo $_POST['Zip/Postal Code']; 
    ?>
    <br>
    <?
    echo $_POST['Phone']; 
    ?>
    <br>
    <?
    echo $_POST['Fax']; 
    ?>
     
    <br>
     
    </center></b>
     
    </TD></TR></TABLE>
    <?
    Print_footer 
    ();
    ?>
    Last edited by bufhal; 06-21-2006 at 03:20 PM. Reason: new title

  2. #2
    bufhal's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Apr 2006
    Posts
    32

    Re: help with another form, please

    I know I need to concatenate thhe fields into a string and assign that string to the message portion of the mail function, but I am at a loss on how to do that. Can anyone offer an example with my posted code?

    It would be greatly appreciated...

  3. #3
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: help with another form, please

    Quote Originally Posted by bufhal
    I know I need to concatenate thhe fields into a string and assign that string to the message portion of the mail function, but I am at a loss on how to do that. Can anyone offer an example with my posted code?

    It would be greatly appreciated...
    The following will build a string of each value, separated by commas:
    PHP Code:
    $values  $_POST['Realname'].",";
    $values .= $_POST['Username'].",";
    $values .= $_POST['Title'].",";
    $values .= $_POST['Company'].","
    $values .= $_POST['Dept'].","
    $values .= $_POST['Address'].","
    $values .= $_POST['City'].","
    $values .= $_POST['Zip/Postal Code'].","
    $values .= $_POST['Phone'].","
    $values .= $_POST['Fax']; 
    Obviously you can separate them with returns "\n" semicolons, a mixture ... or anything else you want, but that demonstrates the principle.
    As for the actual email bit, it's fairly straightforward. I don't have the code off the top of my head, but google "php send smtp mail" should get you something.

  4. #4
    bufhal's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Apr 2006
    Posts
    32

    Re: help with another form, please

    thank you. I appreciate your help...



Tags for this Thread