Insight to PHP?
-
@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.
-
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.
-
PHP webforms are like ultra easy and there are tons of examples out there.
-
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.
-
Let me know if you need any help doing so glad to assist if you hit a road block...
-
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.
-
If you don't feel like doing a lot of work, Google forms might fit the bill. It keeps track of responses, etc also.
-
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/
-
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/
-
@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.
-
One cat, so many ways to skin it. Definitely no need to re-invent the wheel on this one.
-
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.
-
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.