11 Replies Latest reply on Oct 16, 2006 11:15 PM by tembel

    Forms and PHP

    tembel
      My forms on my web site (disconnected for now due to a lot of spoofing done to my e-mail, I suspect through those forms) were created by a web master and I was told that I can edit them as I like and the PHP document will be adjusted accordingly. I tried but it did not work. I was under the impression that when creating a form the PHP document is created automatically and all I have to do is uploading both to the server.

      Any advice on how to edit the forms and the PHP document? I know nothing about forms so any help will be good.

      Thank you,
      marc
        • 1. Re: Forms and PHP
          Level 1
          I take that you are not knowledgable about implementation of PHP or how it works. Working with PHP is a bit more advanced scripting to make it work for your contact form. Unless if you understand the HTML, then PHP is for you.

          In other words, I recommend you that you buy this book called, "PHP for Dreamweaver" who authored by David Powers. The book covers lot of topics, including easy to follow, easy to understand and learn how to work with PHP/MySQL around Dreamweaver. Not only that, but this book also covers about how to set up PHP and MySQL on your machine and understand the importance of working with these functionality of PHP server-side scripts. The book also includes tutorial and sample steps how to set up PHP scripts to make it work for you.

          THe book itself is excellent. What I mean by excellent, it is, in fact, an excellent book, no question. *hands down*
          • 2. Re: Forms and PHP
            Level 7
            > I was under the impression that when
            > creating a form the PHP document is created automatically and all I have
            > to do
            > is uploading both to the server.

            That's not correct. You would create a page with a form, and direct the
            form to submit its data to a PHP processing script that is already on the
            server.

            > was told that I can edit them as I like and the PHP document will be
            > adjusted
            > accordingly. I tried but it did not work.

            I'm a little unclear on what you are actually doing. What kind of edits are
            you making to the form? And what did the webmaster mean by "PHP document
            will be adjusted accordingly"?

            > Any advice on how to edit the forms and the PHP document?

            What *is* "the PHP document"?

            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.dreamweavermx-templates.com - Template Triage!
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
            ==================


            "tembel" <webforumsuser@macromedia.com> wrote in message
            news:egmsa1$8m5$1@forums.macromedia.com...
            > My forms on my web site (disconnected for now due to a lot of spoofing
            > done to
            > my e-mail, I suspect through those forms) were created by a web master and
            > I
            > was told that I can edit them as I like and the PHP document will be
            > adjusted
            > accordingly. I tried but it did not work. I was under the impression that
            > when
            > creating a form the PHP document is created automatically and all I have
            > to do
            > is uploading both to the server.
            >
            > Any advice on how to edit the forms and the PHP document? I know nothing
            > about
            > forms so any help will be good.
            >
            > Thank you,
            > marc
            >
            >


            • 3. Re: Forms and PHP
              tembel Level 1
              Thank you for your reply and your book recomendation, I will take a look at it tomorrow and order it on Amazon.

              Again,
              Thank you
              • 4. Re: Forms and PHP
                tembel Level 1
                In my web folder there are two documents called:
                1. Form.html
                2. Register.html
                I also have in the web folder two documents called:
                1. Form.php
                2. Register.php
                When the site folder was uploaded to my server those forms and their PHP "documents" were uploaded also. From what I understood, when filling up the forms the data is sent to the PHP document and then sent to me via e-mail and an automatic response is sent to the person that filled it up.

                It was my understanding that when editing the forms in Dreamweaver, for example if I want to add a field or a button, the PHP document attached to it "sees" the changes and is updated automatically. However, that was not the case and when trying to edit it the forms just stop working. I always keep a back up and I uploaded the originals again (however, I took them off shortly after).

                Thank you,
                Marc
                • 5. Re: Forms and PHP
                  bregent Most Valuable Participant
                  >It was my understanding that when editing the forms in Dreamweaver, for example if I want to add a field or a button,
                  > the PHP document attached to it "sees" the changes and is updated automatically.

                  No, this is not possible. The php document is not automatically updated when the form document changes. However, scripts can be written to so that they read all fields from the form as an array and then loop through and process them. This can allow you to make changes to the form and the script will be able to handle it. I'm not sure if that's what the developer meant, but it is certainly possible.
                  • 6. Re: Forms and PHP
                    tembel Level 1
                    I was looking into learning PHP and I am sure that it would benefit me and my business in the future however, at this point in time, I do not have the luxury to do so. I would think that there must be a program that will let me create forms and create the PHP in the background as I create the form. All I will have to do after is just put both documents in the web folder.

                    I was looking into 'mailto' tutorials and it is great because that is really what I need, the problem is that the recipient has to have an e-mail client on his/her machine or it will not work. My form right now do not require you to have an e-mail client (at least I don't think so) and also send a message to the recipient with a thank you note and a copy of his/her form. I don't think that mailto form in Dreamweaver is that sophisticated. Or maybe it is.

                    Any suggestion.
                    Marc
                    • 7. Re: Forms and PHP
                      Level 7
                      > I don't think
                      > that mailto form in Dreamweaver is that sophisticated. Or maybe it is.

                      A mailto: link is HTML, not DW. And it's not that sophisticated, it's not
                      reliable, and it's not best practice.

                      > I would think that there must be a program that will let me create
                      > forms and create the PHP in the background as I create the form.

                      If you find such a thing, please post a link to it here.

                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.dreamweavermx-templates.com - Template Triage!
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                      ==================


                      "tembel" <webforumsuser@macromedia.com> wrote in message
                      news:egqlne$pva$1@forums.macromedia.com...
                      >I was looking into learning PHP and I am sure that it would benefit me and
                      >my
                      > business in the future however, at this point in time, I do not have the
                      > luxury
                      > to do so. I would think that there must be a program that will let me
                      > create
                      > forms and create the PHP in the background as I create the form. All I
                      > will
                      > have to do after is just put both documents in the web folder.
                      >
                      > I was looking into 'mailto' tutorials and it is great because that is
                      > really
                      > what I need, the problem is that the recipient has to have an e-mail
                      > client on
                      > his/her machine or it will not work. My form right now do not require you
                      > to
                      > have an e-mail client (at least I don't think so) and also send a message
                      > to
                      > the recipient with a thank you note and a copy of his/her form. I don't
                      > think
                      > that mailto form in Dreamweaver is that sophisticated. Or maybe it is.
                      >
                      > Any suggestion.
                      > Marc
                      >
                      >


                      • 8. Re: Forms and PHP
                        Level 7
                        tembel wrote:
                        > I was looking into learning PHP and I am sure that it would benefit me and my
                        > business in the future however, at this point in time, I do not have the luxury
                        > to do so.

                        Obviously, you have to set realistic objectives for yourself and your
                        business, but learning a new skill may not be a luxury. It's often a
                        necessity to remain competitive.

                        > I would think that there must be a program that will let me create
                        > forms and create the PHP in the background as I create the form. All I will
                        > have to do after is just put both documents in the web folder.

                        Unfortunately, it's not the case. There are scripts that process form
                        output, but if you rely on such a script, and it's compromised by a
                        malicious exploit, you're left high and dry. Each form is different and
                        needs to be validated and processed appropriately. Learning that aspect
                        of PHP would probably take no more than a couple of days. Becoming
                        expert at it, though, takes practice.

                        --
                        David Powers
                        Adobe Community Expert
                        Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
                        http://foundationphp.com/
                        • 9. Re: Forms and PHP
                          bregent Most Valuable Participant
                          >I would think that there must be a program that will let me create forms and create >the PHP in the background as I create the form.

                          You might check out formstogo. It will create the servers side form processing scripts in a variety of scripting languages.
                          • 10. Re: Forms and PHP
                            tembel Level 1
                            Hi ACE,

                            Someone posted a message and recomends 'formstogo'. I am checking it now.
                            • 11. Re: Forms and PHP
                              tembel Level 1
                              Thank you bregent, I am looking at it right now.
                              Marc