ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Insight to PHP?

    Developer Discussion
    12
    20
    3.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch
      last edited by

      PHP webforms are like ultra easy and there are tons of examples out there.

      1 Reply Last reply Reply Quote 1
      • TeleFoxT
        TeleFox
        last edited by

        This is super easy to do. Get a PHP mailer script. Create a form on your web site using HTML then have the form submit <form method="post" action="?"> I put action ? because it came back to my same page... however you can put it to another PHP file called something like mailsubmission.php... in that PHP file you need to get the variables from the form you submitted. Then you need to receive the form items into / from a Post Variable like this

        $to = $_POST['to'];
        $oldmessage = $_POST['message'];
        $email = $_POST['email'];
        $name = $_POST['name'];

        $sent = $_POST['sent'];

        Then use a PHP mailer script to then take those and mail them to the person you want to receive them. Plenty of tutorials on stack exchange how to further do that.

        You can also harden the form itself making sure the expressions are legit with javascript if you want to verify things and make sure no one is hacking your form. Hope this helps.

        1 Reply Last reply Reply Quote 2
        • TeleFoxT
          TeleFox
          last edited by

          Let me know if you need any help doing so glad to assist if you hit a road block...

          1 Reply Last reply Reply Quote 2
          • dafyreD
            dafyre
            last edited by

            Whatever you do, please make sure that you validate your input in PHP before you send the information along. Otherwise, spammers will abuse your form heavily.

            1 Reply Last reply Reply Quote 2
            • stacksofplatesS
              stacksofplates
              last edited by

              If you don't feel like doing a lot of work, Google forms might fit the bill. It keeps track of responses, etc also.

              1 Reply Last reply Reply Quote 0
              • IRJI
                IRJ
                last edited by IRJ

                If you are using a CMS, it is really easy to accomplish this via plugin, but it isn't necessary to have a CMS as it is really easy to do with php mailer.

                http://www.kvcodes.com/2014/01/how-to-create-contact-form-with-phpmailer-to-send-mails/

                stacksofplatesS 1 Reply Last reply Reply Quote 0
                • AmbarishrhA
                  Ambarishrh
                  last edited by Ambarishrh

                  If you just need to create a form and get output, share etc. please check https://www.typeform.com/

                  Some examples https://www.typeform.com/examples/

                  1 Reply Last reply Reply Quote 0
                  • stacksofplatesS
                    stacksofplates @IRJ
                    last edited by

                    @IRJ said in Insight to PHP?:

                    If you are using a CMS, it is really easy to accomplish this via plugin, but it isn't necessary to have a CMS as it is really easy to do with php mailer.

                    http://www.kvcodes.com/2014/01/how-to-create-contact-form-with-phpmailer-to-send-mails/

                    Ya Drupal also makes it really easy with content types.

                    1 Reply Last reply Reply Quote 0
                    • StrongBadS
                      StrongBad
                      last edited by

                      One cat, so many ways to skin it. Definitely no need to re-invent the wheel on this one.

                      1 Reply Last reply Reply Quote 0
                      • Reid CooperR
                        Reid Cooper
                        last edited by

                        As a tool for learning PHP, this should work well. No database needed, just a simple mailer. A single PHP "page" app. Great place to start.

                        1 Reply Last reply Reply Quote 1
                        • StrongBadS
                          StrongBad
                          last edited by

                          I agree, if you pay attention to the bit about wanting to learn PHP, it's something easy to set up and easy to maintain.

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post