Email form

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

    • May 2005
    • 50

    Email form

    How do I insert this in the html? Do I insert it in "before tag", "inside body tag" or "between head tag"?

    <HTML>
    <HEAD>
    <TITLE>Succesfully processed your email</TITLE>
    </HEAD>
    <BODY>
    <H2>Thanks for your email!</H2>

    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "lct@lctfinejewelers.com;
    $mailsubj = "Email";
    $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>

    I can't figure this out because there is the <HTML> <HEAD> at the top and </BODY> <HEAD> at the end of this insert and it seems that would be aduplication of the original html and it may cause confusion. I have also inserted the statcount in between the body tag already. Please give me instruction. Thanks.
  • Pablo
    Moderator

    • May 2005
    • 507

    #2
    Just copy the PHP script and ignore all the default HTML stuff:
    Place this code in 'Beginnig of body':

    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "lct@lctfinejewelers.com;
    $mailsubj = "Email";
    $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);
    ?>
    Forum Moderator
    BlueVoda Spe******t

    Comment

    • dean023
      Second Lieutenant

      • Jun 2005
      • 148

      #3
      Originally posted by Pablo
      Just copy the PHP script and ignore all the default HTML stuff:
      Place this code in 'Beginnig of body':

      <?PHP
      $email = $HTTP_POST_VARS[email];
      $mailto = "lct@lctfinejewelers.com;
      $mailsubj = "Email";
      $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);
      ?>

      does this work for any form as i can't seem to get it to work!
      do i need to set up a PHP file?
      www.nativeskins.co.uk

      Comment

      • Pablo
        Moderator

        • May 2005
        • 507

        #4
        Please read:
        Discussion and help related to designing and implementing forms in the BlueVoda Website Builder.
        Forum Moderator
        BlueVoda Spe******t

        Comment

        • dean023
          Second Lieutenant

          • Jun 2005
          • 148

          #5
          Originally posted by Pablo

          I have read this and done as described but it's not working for me.

          i've copied the script in notepad
          called it feedback
          uploaded it to file manager
          which did nothing - copied feedback to public_html file
          now when submitted just displays the script text

          what am i doing wrong?
          www.nativeskins.co.uk

          Comment

          • Pablo
            Moderator

            • May 2005
            • 507

            #6
            Did you give it the extension .PHP?
            Did you correctly setup your form to use the file?

            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 = "feedback@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>
            Last edited by Pablo; 06-19-2005, 10:35 AM.
            Forum Moderator
            BlueVoda Spe******t

            Comment

            • dean023
              Second Lieutenant

              • Jun 2005
              • 148

              #7
              this is what is in my feedback.php file:
              <HTML>
              <HEAD>
              <TITLE>Thank you for your feedback&lt;/TITLE>
              </HEAD>
              <BODY>
              <H2>Thank you for your feedback!&lt;/H2>
              <?PHP
              $email = $HTTP_POST_VARS[email];
              $mailto = "dean023****.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>

              i've changed the email address to mine but thats the only change.

              when i saved the file i just called it FEEDBACK and the .php was added because of what file it was selected. this has been save in my public_html file is that the right place?

              If i saved it as FEEDBACK.PHP it was saved as FEEDBACK.PHP.txt
              which didn't came up as page not found. so i presume the first was correct.
              but when i submit it opens up a blank page and thats it.

              The tutorials are geared up for selling this product and makes everything so simple but now i've joined nothing seems straight forward without some knowledge.
              www.nativeskins.co.uk

              Comment

              • Pablo
                Moderator

                • May 2005
                • 507

                #8
                First of all this script has nothing to do with BlueVoda and is provided for support purposes only. It is created to work around bugs and design flaws in 3rd party products. The script is provided "AS IS" without warranty of any kind. However it seems to work for most of the users.

                It MUST have the .php externsion not .txt or .php.txt
                Please replace all
                &lt;
                with
                <
                Forum Moderator
                BlueVoda Spe******t

                Comment

                • dean023
                  Second Lieutenant

                  • Jun 2005
                  • 148

                  #9
                  Originally posted by Pablo
                  First of all this script has nothing to do with BlueVoda and is provided for support purposes only. It is created to work around bugs and design flaws in 3rd party products. The script is provided "AS IS" without warranty of any kind. However it seems to work for most of the users.

                  It MUST have the .php externsion not .txt or .php.txt
                  Please replace all
                  &lt;
                  with
                  <
                  Pablo
                  many thanks for you help it is appreciated. I'm just very fustrated and believe if i can't do the simpliest of tasks then i'm not going to achieve my web site for the use of selling things. I just don't seem to be able to anything.

                  i've uploaded the zip file of cubecart and it won't extract the contents.

                  i'll change the &lt; now and give it ago

                  thanks again
                  www.nativeskins.co.uk

                  Comment

                  • dean023
                    Second Lieutenant

                    • Jun 2005
                    • 148

                    #10
                    ok some progress.

                    now instead of a blank page i get "thankyou for your feedback"

                    however no email is sent to me
                    www.nativeskins.co.uk

                    Comment

                    • Sarah
                      Colonel

                      • May 2005
                      • 513

                      #11
                      check your bulk mail & spam folders

                      VodaHost

                      Your Website People!
                      1-302-283-3777 North America / International
                      02036089024 / United Kingdom
                      291916438 / Australia

                      ------------------------

                      Top 3 Best Sellers

                      Web Hosting - Unlimited disk space & bandwidth.

                      Reseller Hosting - Start your own web hosting business.

                      Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


                      Comment

                      • dean023
                        Second Lieutenant

                        • Jun 2005
                        • 148

                        #12
                        Originally posted by Sarah
                        check your bulk mail & spam folders

                        you little beauty!!!!! in my spam folder on aol. used this for testing purposes will now change addy to web email.

                        thought i was going mad

                        many thanks!!!
                        www.nativeskins.co.uk

                        Comment

                        • allan
                          Members

                          • May 2005
                          • 50

                          #13
                          Ooops again! I posted the message in the wrong forum. Okay, Pablo, How do I upload the feedback.php in the domain from the notepad. As I was saying in the other forum, you look like the guy in the movie, Matrix, but Sarah sure looks better than you. HAHAHAHAHAHAHA

                          Comment

                          • allan
                            Members

                            • May 2005
                            • 50

                            #14
                            Hey how come the time on the upper left hand corner do not correspond to the actual time. Mine is East coast time at 1:30 and the time on the reply is 5:16 pm??????

                            Comment

                            • allan
                              Members

                              • May 2005
                              • 50

                              #15
                              No, its 1:16 pm but it says 5:16 pm. That's a four hours difference!

                              Comment

                              Working...
                              X