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.
    • S
      scottalanmiller
      last edited by

      Well the form would be displayed by HTML5, PHP itself has no display language. But it would only make sense to make everything in PHP, what other option did you have in mind?

      G 1 Reply Last reply Reply Quote 0
      • G
        G I Jones @scottalanmiller
        last edited by G I Jones

        @scottalanmiller Of course, lol. My question is more about the "behind the scenes" stuff.

        I didn't know if I needed PHP in conjunction with some other language, or if it's even simple stuff in the world of php.

        S 1 Reply Last reply Reply Quote 0
        • G
          G I Jones
          last edited by G I Jones

          I had initially started researching how to do this with a fillable PDF, but people have said it's impossible. So I guess I'm moving on now to research if and how hard it would be to do it with php.

          S 1 Reply Last reply Reply Quote 0
          • N
            NashBrydges @G I Jones
            last edited by

            @G-I-Jones As Scott mentioned, HTML would render the form for your users and you would use PHP to process that form to send the email. PHP won't send the actual email, you'll need a mail server to do this, but PHP will take care of getting the information from the HTML form and adding the necessary bits and data processing to forward off your email.

            One caution though...are you sending personal, private information via email? If you are, you may want to rethink your approach or at least take steps to ensure that your browser connection to the web server is secure (Let's Encrypt can help here) and that you are sending the email from a TLS enabled email server to a TLS enabled email server otherwise your data is open to interception while in transit.

            Definitely more than one way to skin this cat, depending on your full requirements.

            G 1 Reply Last reply Reply Quote 2
            • G
              G I Jones @NashBrydges
              last edited by

              @NashBrydges That answered my question in full. I appreciate that.

              1 Reply Last reply Reply Quote 0
              • S
                scottalanmiller @G I Jones
                last edited by

                @G-I-Jones said in Insight to PHP?:

                @scottalanmiller Of course, lol. My question is more about the "behind the scenes" stuff.

                I didn't know if I needed PHP in conjunction with some other language, or if it's even simple stuff in the world of php.

                HTML5 is the only language that exists on the browser. PHP can't run there. HTML5 is the display language of the web. If you don't want to use the web, you can use only PHP of course.

                1 Reply Last reply Reply Quote 0
                • S
                  scottalanmiller @G I Jones
                  last edited by

                  @G-I-Jones said in Insight to PHP?:

                  I had initially started researching how to do this with a fillable PDF, but people have said it's impossible. So I guess I'm moving on now to research if and how hard it would be to do it with php.

                  Not impossible, just ridiculously hard.

                  1 Reply Last reply Reply Quote 0
                  • M
                    marcinozga
                    last edited by

                    Don't reinvent the wheel. Install CMS of your choice and be done with it, Drupal, Joomla, Wordpress for example. I'm most familiar with Drupal, and with Webform module you can create any form with any field types you want. Or even use Google Forms and embed it in existing website.

                    1 Reply Last reply Reply Quote 0
                    • J
                      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
                      • T
                        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
                        • T
                          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
                          • D
                            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
                            • S
                              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
                              • I
                                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/

                                S 1 Reply Last reply Reply Quote 0
                                • A
                                  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
                                  • S
                                    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