When you create a contact form in PHP, there’s a couple key parts you need to make sure are in place so the person actually using the form doesn’t want to suddenly get into knife-throwing (at your head) afterward.
You need validation that make sense and is easy to understand.
I prefer the kind that shows up all at the top of the form, because when you have a long form and missed one checkbox and have to go hunting through the form like you’re looking for a lost sock… knife-throwing becomes a viable option.
Next, you need to make sure when there is an error, you don’t lose all the data you entered already.
Nothing will get knives, bricks, cars, kitchen sinks, those big bats with spikes on them… thrown at your head faster than making me re-enter all the form field data again because I forgot to check whether I like chocolate bunnies or not.
With all that in mind, I humbly present to you MY contact form tutorial:
It’s possible this could be YOUR contact form… meaning you’re obviously cool like me and think the way it’s built is perfect.
Or, you may to prefer to hurl insults at me on YouTube about it.
Either way, there’s 100 ways to skin a cat (but why would you)… and this is just one. Use it if you like it.
P.S. Ah yes! That pesky source code. You can get that as a supporting listener of the podcast. Learn how to do that here: http://johnmorrisonline.com/patreon
P.P.S. If you liked the show, give it a like and share with the communities and people you think will benefit. And, you can always find all my tutorials, podcast episodes and more on johnmorrisonline.com, @jpmorris on Twitter and youtube.com/johnmorrisvideo.
Subscribe to the Podcast