12 Replies Latest reply on Jan 27, 2008 7:48 AM by smartdesignz

    How to pass form parameters to the confirm page (PHP, MySQL)

      Hi, can anyone tell me if there is a way to pass the form parameters such as name, surname to the form submit conformation page ie:

      'Dear name surname

      Thank you for submitting your details. We will contact you as soon as possible etc.'

      Thanks

      Bert
        • 1. Re: How to pass form parameters to the confirm page (PHP, MySQL)
          Günter Schenk Level 4
          Hi Bert,
          just try with...

          ----------------
          Dear

          Thank you for submitting your details. We will contact you as soon as possible
          ----------------

          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: How to pass form parameters to the confirm page (PHP, MySQL)
            Level 1
            This didn't work.

            There is the form which inserts customer details into database and sends email to customer they both work fine using insert record form tool. I think what is missing there is passing the customer id or form parameters to the confirm page.

            How do I pass the customer id or these form parameters while using insert record form tool?

            Thanks

            Bert.
            • 3. Re: How to pass form parameters to the confirm page (PHP, MySQL)
              Günter Schenk Level 4
              >>
              I think what is missing there is passing the customer id or form parameters to the confirm page
              >>

              yes indeed, you can transmit several "insert transaction" parameters & values to the confirm page you certainly defined as "where to redirect after inserting the form values" target -- and as those values are getting passed via URL, you´ll have to use...

              Dear

              instead to capture the values.

              Günter Schenk
              Adobe Community Expert, Dreamweaver
              • 4. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                Level 1
                Hi Forgive me but it still doesnt work, I wish I could write PHP :(

                on the booking page I already have insert transaction (it comes with insert form wizard) however if I double click insert Transaction, first check variable is Form Variable (I tried URL didnt work) after inserting goto confirm.php I cant see how this passes any url parameters to the confirm page.

                Is there a function similar to go to detail page where it pases the id to the confirm page.

                Would you be able to instruct me step by step on this. I have been searching everywhere but there is no documentation.

                Many thanks

                Bert
                • 5. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                  Günter Schenk Level 4
                  yes, the current documentation isn´t that great when it comes to such details, but it´s rather easy to add parameters & transaction values to your "confirm.php" page displayed in the "after inserting, go to" field:

                  1. type ?name= after the ".php" and then click the blue lightning icon right to the "Browse..." button -- this will open a new "Developer Toolbox Dynamic Data" window

                  2. in here you can choose from a variety of options. In your case it should be...

                  - Get values from: Transaction field

                  - Transaction field: name (equals the input field´s name that´s containing the user´s "name")

                  - you´ll note that the contents of the "Mark-up code" field always gets updated when changing the menu options -- in your case it should contain {name}

                  - clicking OK will confirm the "mark-up code", close the window and automatically add {name} to the contents of the "after inserting, go to" field -- should now be "confirm.php?name={name}", right ?

                  3. now type &surname= after the current field contents, and simply repeat the steps explained in the previous step -- the only difference will be to select "Transaction field: surname"

                  4. That´s basically it, and you should now see something like...

                  confirm.php?name={name}&surname={surname}

                  ... in the "after inserting, go to" field.

                  These are the parameters & values which will get passed to "confirm.php", and in here you´ll need to grab them using



                  as already explained.

                  Hope this helps ;-)

                  Günter Schenk
                  Adobe Community Expert, Dreamweaver
                  • 6. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                    Another way could be to use the id number in step 1 and 2:
                    confirm_message.php?message_id={message_id}

                    Then on the confirmation page add a recordset with filter message_id = url parameter message_id.

                    Then you can drag the data from the bindings table on the php page.
                    • 7. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                      Level 1
                      Wow I can not thank you enough, I tried first one and it worked. Finally, I have been looking everywhere for this. I think you should include it in the tutorials.

                      I will try the second soon.

                      Thank you guys

                      Bert
                      • 8. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                        Thanks, Tim. I s actually passing the first name in the URL, which I didnt like, but I forgot that the message was already posted so I could use the ID, which I added to the original form in a hidden field. I too, have been searching for a solution.

                        I used to have MXKart from Interakt and it allowed me to save stuff as a session variable, and then use it again anytime I wanted. thats the ideal solution, and I'm sure it can still be done, you would just have to know how to write that as a custom trigger, or transaction, or something...which I don't know how to do. Anyway... this is a great alternative for now.
                        • 9. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                          Level 1
                          ps... if anyone knows how to get a form field FROM A DYNAMIC FORM 9dev toolbox version) converted to a session variable.... that would be great. Thanks,
                          Neil
                          • 10. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                            Hi,
                            I'm quite new in PHP, MySQl and Dreamweaver.
                            I'm having a problem with passing form variable and retrieving data from a MySQL database.

                            Here's the thing...I use a login page where user enters the ID and password. This page is linked to a table in the database where all the login information is saved...When correct ID and password is eneterd it goes to another page. In that page, I want to show some information from the table according to the ID. (ie.. the user's information).

                            I've tried it several times with recordsets, form varibales and so on.. but couldn't do it. I want to display user ID, name, and address in that form which is stored in the database table.

                            Thank you in advance.
                            • 11. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                              Thanks a lot. This help really solved almost 90% of my problem. I have one more to solve and then i ready to go live.
                              • 12. Re: How to pass form parameters to the confirm page (PHP, MySQL)
                                smartdesignz
                                Hi

                                i usually do it this way:

                                look for this part // Register triggers

                                you will see a line saying something like below

                                $ins_contactme->registerTrigger("END", "Trigger_Default_Redirect", 99, "thanks.php?FirstName={FirstName}&Surname={Surname}");

                                on your thanks.php

                                do a Recordset(Query) under the Binding tab and filter by Firstname and Surname