Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Reply Form

  1. #1
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    I am using a reply form on my php built site and currently when someone fills out the form (name, email, message fields), it sends me all their info but when I hit reply, by default I am replying to myself. I have to manually enter in their email address in the TO field. Is there anyway their email goes into the TO field by default when I reply?

  2.  

  3. #2
    Senior Member DanielOliver's Avatar
    Join Date
    Jun 2003
    Location
    Cornwall, England.
    Posts
    1,202
    Member #
    1879
    This wont help but I am also suffering from the same problem, and I'm not sure if there is any way of over coming this problem to be honest.

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Manually craft the mail headers. See http://www.php.net/mail .
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Here is my mail.php page..

    <?
    /* Form Mailer Program */

    $errorpage = "http://www.xxxx.com/error.php";
    $mailto = "info@xxxxxxxxx.com";
    $required = array("First_Name","Last_Name","Email","Message"); // what do you wish to require?

    What should I add to it?

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    You need to edit the headers...
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Ok if you mean this in the contact.php page..

    <title>My Website</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="description" content="xxxxx,xxxxx,xxxxxx.">
    <meta name="keywords" content="xxxxx,xxxxx,xxxxx">
    <meta name="robots" content="all">


    What should I add to it?

  8. #7
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    Here is how you edit the headers:

    PHP Code:
    $to "asdf@asdf.com";
    $from "123@1234.com";
    $subject "test";
    $message "testing";

    $headers "From: $from\r\n";
    $headers .= "Reply-To: $from";

    mail($to$subject$message$headers); 
    There and Back Again :Ogre:

  9. #8
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Ok but what I dont understand is where do I put that heading? In the mail.php page where the form gets the info from or in the between the head tag of the contact.php page?

  10. #9
    Member
    Join Date
    Sep 2003
    Posts
    42
    Member #
    2955
    Here is my form:

    <form action="mail.php" method="get">
    <input type="hidden" name="redirect" value="http://www.xxxxxx.com/thanks.php">
    <input type="hidden" name="subject" value="Contact Form">

    <table border="0" width="350" cellpadding="1" cellspacing="1">
    <tr>
    <td width="162">First Name: <font color="#FF0000">*</font></td>
    <td width="188">
    <input type="text" name="First_Name" size="30" maxlength="60">
    </td>
    </tr>
    <tr>
    <td width="162">Last Name: <font color="#FF0000">*</font></td>
    <td width="188">
    <input type="text" name="Last_Name" size="30" maxlength="60">
    </td>
    </tr>
    <tr>
    <td width="162">E-Mail: <font color="#FF0000">*</font></td>
    <td width="188">
    <input type="text" name="Email" size="30" maxlength="60">
    </td>
    </tr>
    <tr>
    <td width="162">Re-enter Email: <font color="#FF0000">*</font></td>
    <td width="188">
    <input type="text" name="Email2" size="30" maxlength="60">
    </td>
    </tr>
    <tr>
    <td width="162">Message: <font color="#FF0000">*</font></td>
    <td width="188">
    <textarea name="Message" cols="40" rows="6" wrap="soft"></textarea>
    </td>
    </tr>
    <tr>
    <td width="162">&nbsp;</td>
    <td width="188"> <br>
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" name="Reset" value="Reset">
    </td>
    </tr>
    </table>
    </form>

    Here is my mail.php page:

    <?
    /* Form Mailer Program */

    $errorpage = "http://www.xxxxxx.com/error.php";
    $mailto = "info@xxxxxx.com";
    $required = array("First_Name","Last_Name","Email","Message"); // what do you wish to require?

    // Do not edit below

    $n = 0;
    do {
    $r = $required[$n];
    if(!$$r) {
    print Header("Location: $errorpage");
    exit;
    }
    $n++;
    } while ($n != count($required));

    $a = urldecode($QUERY_STRING);
    $a = str_replace("&","\n\n",$a);
    $a = str_replace("=",": ",$a);
    $a = str_replace("@","_AT_",$a);
    mail($mailto,$HTTP_GET_VARS["subject"],$a,"From: $mailto");
    ?>

    <?php
    /* The Thankyou page*/

    include("/hsphere/local/home/xxxx/xxxxxx.com/thanks.php"); ?>


    I'm not sure where to put that header that you provided.

  11. #10
    Member Seraph's Avatar
    Join Date
    Sep 2003
    Posts
    81
    Member #
    3090
    [CODE]
    <?
    /* Form Mailer Program */

    $errorpage = "http://www.xxxxxx.com/error.php";
    $mailto = "info@xxxxxx.com";
    $required = array("First_Name","Last_Name","Email","Message"); // what do you wish to require?

    // Do not edit below

    $n = 0;
    do {
    $r = $required[$n];
    if(!$$r) {
    print Header("Location: $errorpage");
    exit;
    }
    $n++;
    } while ($n != count($required));

    $a = urldecode($QUERY_STRING);
    $a = str_replace("&","\n\n",$a);
    $a = str_replace("=",": ",$a);
    $a = str_replace("@","_AT_",$a);
    $headers = "From: $from\r\n";
    $headers .= "Reply-To: $from";

    mail($mailto,$HTTP_GET_VARS["subject"],$a,$headers);
    ?>

    <?php
    /* The Thankyou page*/

    include("/hsphere/local/home/xxxx/xxxxxx.com/thanks.php"); ?>
    [/CODE}


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:06 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com