another forms question

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • rdensford
    Sergeant

    • Jun 2005
    • 33

    another forms question

    I read about the "confirmation page" and it makes perfect sense. BUT. How/where do I link the submission form and the confirmation page?
    I'm just confused about how to tie them all together with the forms. Thanks.
    Ronda


    <SCRIPT LANGUAGE="php">
    $email = $HTTP_POST_VARS[email];

    $mailto = "ruth@rudesign.co.uk";

    $mailsubj = "Form submission";

    $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);

    </SCRIPT>

    <META HTTP-EQUIV="Refresh" Content="5; URL=welcome.html">
  • rdensford
    Sergeant

    • Jun 2005
    • 33

    #2
    I had to improvise... I don't like the way it is right now.





    I really want to set it up like rdarko suggested. Any tips?

    Comment

    • Pablo
      Moderator

      • May 2005
      • 507

      #3
      The code above should be part of your confirmation page! Well at least that's what it was designed to be;)
      So there's no need to redirect since the form action already redirects to your confirmation page.
      Forum Moderator
      BlueVoda Spe******t

      Comment

      • rdensford
        Sergeant

        • Jun 2005
        • 33

        #4
        hmmm

        I don't get it. If I have created a seperate form page, how do I tie it to the confirmation page? Aren't they (2) seperate pages in my web? When I created the contact form, do I change the action or the method?
        thanks. i am p.c. challenged :)





        Originally posted by Pablo
        The code above should be part of your confirmation page! Well at least that's what it was designed to be;)
        So there's no need to redirect since the form action already redirects to your confirmation page.

        Comment

        • rdensford
          Sergeant

          • Jun 2005
          • 33

          #5
          Can you tell me where to put the text I want to put in? "Thank you for your interest. You will be redirected to my home page" ... etc etc.

          Edit the script below where necessary and place this in your CONFIRMATION page

          <SCRIPT LANGUAGE="php">
          $email = $HTTP_POST_VARS[email];

          $mailto = donna@platinumrealtysellsjax.com;

          $mailsubj = "Agent Inquiry";

          $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);

          </SCRIPT>

          <META HTTP-EQUIV="Refresh" Content="5; URL=welcome.html">















          Originally posted by Pablo
          The code above should be part of your confirmation page! Well at least that's what it was designed to be;)
          So there's no need to redirect since the form action already redirects to your confirmation page.

          Comment

          • rdensford
            Sergeant

            • Jun 2005
            • 33

            #6
            I figured that one out. however. how do i get rid of the < I get on my confirmation page. also, could someone tell me how to format the text on that page? thanks.

            ronda please go to this page and hit send. you'll see what i mean!

            Comment

            • Pablo
              Moderator

              • May 2005
              • 507

              #7
              If you have a <, you have copied invalid code into the HTML box. Looking at your code it contains several errors, so please follow these instructions carefully and ignore any other versions of this script on the forum;)
              Anyway here's the correct code and implementation one more time:
              1. Create a new page with BlueVoda (let's say feedbackform.bvp)
              2. Drag the Form object to the page and a draw a box to indicate the position of the form.
              3. Design your form by adding some Form controls to the form:
              Buttons, Image Buttons, Advanced Buttons, Checkboxes, Radio buttons, Editboxes, Text Areas and Comboboxes.
              You can also make text and images part of the form.

              Notice that all objects become a part of the form, so when you change the position of the form all those objects move along.

              4. Make sure your form contains a Submit button. Without this button the user will not be able to submit the entered data.

              5. Once you have designed your form, you may need to set some properties. Select the form and choose Edit|Properties from the BlueVoda menu.
              The most important thing you need to do is specify the form action.
              In this case we are going to use a second (PHP) page to process the results of the form and this will be the confirmation page at the same time.
              So set the action property to feedback.php
              and remove any text from the encoding type property.
              6. Publish the feedbackform.bvp page to your VodaHost account.

              7. Now let's create the confirmation page using BlueVoda:
              8. Create a new page with BlueVoda and save is as 'feedback.bvp'.
              9. Select View->Page HTML from the menu
              10. Select the Inside Body tag and enter this code:
              <?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);
              ?>
              11. Do the usual page formatting with BlueVoda, for example add a textbox with the text "Thanks for your feedback, your comments have been processed!"
              12. Select View->Page Properties from the menu
              13. Set the file extension to php
              14. Publish the page feedback.bvp to your VodaHost account.

              Now you have two pages:
              1) a page with the feedback form
              2) a page that processes the input and displays a confirmation message.

              Notes:
              - Instead of feedback you can give it any name you like.
              - The blue text in the code above can be changed to anything you like, but be sure you keep the double quotes.

              Pablo
              Last edited by Pablo; 07-13-2005, 09:36 PM.
              Forum Moderator
              BlueVoda Spe******t

              Comment

              • apic
                Private First Class

                • Jul 2005
                • 7

                #8
                Hi Pablo,

                Question re the script you have written below.

                I have spend many hours - (approx 14!!) trying to get my form page working.
                i have even had one of your lovely members have a look at my pages.

                www.myhomesweethome.com.au/registerapi.htm

                and

                www.myhomesweethome.com.au/confirm.htm

                to try and find where i am out?? - No Luck!!
                Does the writing you provide in blue in the script below have to be exact?
                I understand $mailto = " my email address"
                but what should the
                $mailsubj = ????? & $mailbody = " ?????

                This is the only area i can see i may be entering wrong text??


                $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";

                PLEASE HELP!! I dont know how many more hours i can go round and round.

                Comment

                • Pablo
                  Moderator

                  • May 2005
                  • 507

                  #9
                  Replacefeedback@yourdomain.comwith you own email address.
                  ReplaceFeedback form with you own subject line (this can be any text you like).
                  ReplaceValues submitted from web site form with you own text (this can be any text you like).

                  Did you follow my steps exactly as I wrote them?
                  Looking at your page I'm missing confirm.php, so you missed at least two important steps (12 and 13).

                  www.myhomesweethome.com.au/registerapi.htm looks fine, so now concentrate on the confirm page, do not forget to set the file extension to php (step 13)
                  And of course make sure the PHP code is on the correct place in the webpage.
                  Forum Moderator
                  BlueVoda Spe******t

                  Comment

                  • apic
                    Private First Class

                    • Jul 2005
                    • 7

                    #10
                    Pablo -How about this??

                    Hi Pablo,
                    Thanks for the reply.
                    I think i have made some progress now.
                    When working on the voda files in my harddrive it all worked ie: when in the confirm page it rediverted back to my registerapi page after 5 secs. The only thing that did not work was clicking on submit in the form area. I get an error 404 page – page cannot be found.
                    When I uploaded both pages to my FTP program to go live on the web I still get this error message on my registration page and also when my confirm page diverts back to the registerapi page , it now also has the page cannot be found.



                    I just seem to be missing something in the submit instructions and when live, it cannot refind my registerapi page?



                    Any ideas?

                    Oh, and one other thing I am not sure about… I made both my registerapi and confirm pages in bluevoda and saved as normal BVP. Then I click on the browser and also save them in explorer under the name only ie: registerapi. Now I have 2 registerapi’s – BVP and (explorer?).

                    I then do the same for confirm.



                    · I also did a blank notepad page…..inserted the script again



                    · <SCRIPT LANGUAGE="php">

                    $email = $HTTP_POST_VARS[email];

                    $mailto = "rghome@bigpond.net.au";

                    $mailsubj = "Form submission";

                    $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);

                    </SCRIPT>

                    <META HTTP-EQUIV="Refresh" Content="5; URL=registerapi.html">

                    And saved it as confirm.php.



                    Then I uploaded all these files to the FTP program.



                    Is this right??

                    Comment

                    • Pablo
                      Moderator

                      • May 2005
                      • 507

                      #11
                      If you follow my instructions there is no need to use a separate FTP program to upload any files manually or to write any script using notepad, it can all be done from BlueVoda.
                      Also I never mentioned to use the line
                      <META HTTP-EQUIV="Refresh" Content="5; URL=registerapi.html">
                      Although it might be usefull for other scripts, in this case it doesn't make much sence to use it and you can not put that code just anywhere in the page, it always has to be in the header section of the page.

                      Start with step 7 (and execute every other step till 14), it's the only way it is going to work.
                      If something is not clear let me know, but please do not add any other code until it works.
                      Forum Moderator
                      BlueVoda Spe******t

                      Comment

                      • Michelle
                        Private First Class

                        • Dec 2005
                        • 7

                        #12
                        Re: another forms question

                        Help me Pablo!

                        I have read and re-read this thread and viewed and re-viewed the tutorial videos, still, after days of working on my form, it doesn't work!

                        I think that something is happening to the HTML when I publish the file. While in Blue Voda all looks well, but when I publish it the HTML for the form disappears.
                        I have also tried saving the HTML in Notepad and using BlueFTP to upload the file. Still something is wrong with the file.

                        I finally tried manually editing the file while in cPanel X and it looks ok while in the 'edit file' mode. However, when I go to the HTML Editor the HTML is messed up!

                        What would make the HTML change like that?

                        What in the world am I doing wrong?

                        Thanks,
                        Michelle

                        Comment

                        • Ram_Industries
                          First Lieutenant

                          • Dec 2005
                          • 164

                          #13
                          Re: another forms question

                          Pablo:

                          I have read this thread several times and have but 1 question.

                          I want to create a feedback form that is bi-directional.

                          By bi-directional I want this form to be submitted to (2) separate e-mail addresses.

                          One to be sent to myself, and one to be sent to the party I am promoting the business for.

                          How would I create a bi-directional feedback form as described above so that both parties receive the exact form?

                          Thank you

                          Robert Montgomery
                          Ram_Industries
                          Ram_Industries
                          Robert A. Montgomery
                          Ram-Industries@comcast.net
                          http://Martech-Inc.biz

                          Comment

                          • Pablo
                            Moderator

                            • May 2005
                            • 507

                            #14
                            Re: another forms question

                            You can try:

                            $mailto = "email1@server.com;email2@server.com";
                            Forum Moderator
                            BlueVoda Spe******t

                            Comment

                            • Ram_Industries
                              First Lieutenant

                              • Dec 2005
                              • 164

                              #15
                              Re: another forms question

                              Thank you Pablo:

                              Can a forwarded approach in cpanel work as well in creating such a form?

                              Robert Montgomery
                              Ram_Industries
                              Ram_Industries
                              Robert A. Montgomery
                              Ram-Industries@comcast.net
                              http://Martech-Inc.biz

                              Comment

                              Working...
                              X