Announcement

Collapse
No announcement yet.

Submitting Forms

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Submitting Forms

    Hello you wonderful forum helpers... Before anyone sends me (back) to the previously posted threads regarding the scripts for form submissions, let me say that I have read and re-read all of them. I have a feedback page on my site and have set the page properties file extension to php and on the object properties (for the form itself) set to action: feedback.php and method: post.

    On the page html, I have placed on the inside body tag the following:
    <?PHP

    $email = $HTTP_POST_VARS[email];

    $mailto = "feedback@lifeatfifty.com";

    $mailsubj = "Feedback form";

    $mailhead = "From: $email\n";

    reset ($HTTP_POST_VARS);

    $mailbody = "Values submitted from web site form:\n";

    while (list ($key, $val) = each ($HTTP_POST_VARS))

    {

    $mailbody .= "$key : $val\n";

    }

    mail($mailto, $mailsubj, $mailbody, $mailhead);

    ?>

    After saving and publishing the page, uploading the notepad file called feedback.php (as designated in the thread), I still don't get the desired results. I fill in some text on the feedback form and hit the submit button. At that time I get an Internet Explorer window stating the following:

    This form is being submitted using e-mail. Submitting this form will reveal your e-mail address to the recipient, and will send the form data without encrypting it for privacy. You may continue or cancel this submission.

    When I hit continue, it takes me to my log in page for my email. When I log in, I simply have a "compose" window with my website's email address in the "to" field. Trying it from my laptop, I get the same IE window, but when I hit continue, it does nothing. Can someone help me please? Appreciative as always.

  • #2
    If you read the previous threads about this subjkect carefully you'll notice that you have to enter 'feedback.php' in the action field instead of mailto:you@youremail.com

    Here's the complete instruction once again:

    Change the form properties (in BlueVoda) to:
    Action: feedback.php
    Method: POST

    EncodingType:
    (remove the text/plain, so the field becomes empty)

    Now create a new file using Notepad and call it: feedback.php
    Enter the following code into the file:
    <HTML>
    <HEAD>
    <TITLE>Thank you for your feedback</TITLE>
    </HEAD>
    <BODY>
    <H2>Thank you for your feedback!</H2>
    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "yourname@yourdomain.com";
    $mailsubj = "Feedback form";
    $mailhead = "From: $email\n";

    reset ($HTTP_POST_VARS);

    $mailbody = "Values submitted from web site form:\n";

    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    $mailbody .= "$key : $val\n";
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>
    </BODY>
    </HEAD>



    Make sure your form contains an editbox with the name 'email'
    Finally upload feedback.php to your web server.

    Instead of create the feedback page using notepad you can also use BlueVoda:
    http://www.vodahost.com/vodatalk/showthread.php?t=809
    and scroll all the way down to see my last post.
    Forum Moderator
    BlueVoda Spe******t

    Comment


    • #3
      Thanks for your reply... perhaps you didn't see in the first paragraph of my original thread that I did change the form action to feedback.php. I was able to paste the code into notepad and uploaded. Any idea where I go from here?

      Originally posted by Pablo
      If you read the previous threads about this subjkect carefully you'll notice that you have to enter 'feedback.php' in the action field instead of mailto:you@youremail.com

      Here's the complete instruction once again:

      Change the form properties (in BlueVoda) to:
      Action: feedback.php
      Method: POST

      EncodingType:
      (remove the text/plain, so the field becomes empty)

      Now create a new file using Notepad and call it: feedback.php
      Enter the following code into the file:
      <HTML>
      <HEAD>
      <TITLE>Thank you for your feedback</TITLE>
      </HEAD>
      <BODY>
      <H2>Thank you for your feedback!</H2>
      <?PHP
      $email = $HTTP_POST_VARS[email];
      $mailto = "yourname@yourdomain.com";
      $mailsubj = "Feedback form";
      $mailhead = "From: $email\n";

      reset ($HTTP_POST_VARS);

      $mailbody = "Values submitted from web site form:\n";

      while (list ($key, $val) = each ($HTTP_POST_VARS))
      {
      $mailbody .= "$key : $val\n";
      }
      mail($mailto, $mailsubj, $mailbody, $mailhead);
      ?>
      </BODY>
      </HEAD>



      Make sure your form contains an editbox with the name 'email'
      Finally upload feedback.php to your web server.

      Instead of create the feedback page using notepad you can also use BlueVoda:
      http://www.vodahost.com/vodatalk/showthread.php?t=809
      and scroll all the way down to see my last post.

      Comment


      • #4
        Hi there,

        What I don't understand is why are you adding "On the page html, I have placed on the inside body tag the following"

        I didn't do this, I just uploaded the .php file by ftp and it worked fine. I can't see that you need to do both. The code behind the form picks up the file I think.

        Also, could it be an email problem. It is getting to the stage whereby it's giving the message about emailing then it seems that your email program is falling down. Do you have a firewall of some sort or some email protection program running.

        Have a look at my contact page and right click view source to see the code.
        www.superfastincome.com/contact.html then compare to yours etc.

        Paul
        Oscommerce sites : www.nutritionzone.co.uk
        www.aromaskincare.co.uk
        www.thebirthbox.com

        Comment


        • #5
          Hi Paul, thanks for responding. I added the inside body tag content because I thought that I needed it. I have been trying to follow the forum threads relative to forms, and I guess I read where this is necessary. So I'll go back and delete that inside body tag content and try again.

          Patti

          Originally posted by paulb
          Hi there,

          What I don't understand is why are you adding "On the page html, I have placed on the inside body tag the following"

          I didn't do this, I just uploaded the .php file by ftp and it worked fine. I can't see that you need to do both. The code behind the form picks up the file I think.

          Also, could it be an email problem. It is getting to the stage whereby it's giving the message about emailing then it seems that your email program is falling down. Do you have a firewall of some sort or some email protection program running.

          Have a look at my contact page and right click view source to see the code.
          www.superfastincome.com/contact.html then compare to yours etc.

          Paul

          Comment

          Working...
          X