Contact Forms with PHP

I’m in the middle of the WordPress Development track on Treehouse and so excited to get a proper introduction to PHP.  I had started the PHP track on Codecademy, but stopped mid-stream to switch to the Javascript module I’m currently in on that site.

PHP is my first introduction to a server-side language and luckily for me the syntax makes sense, so far at least.  That is one benefit of having already completed the Web Design and Front-end Development tracks on Treehouse.

I had always wondered how an HTML document “sent” its information to a server and luckily for me I learned how when we recently covered adding a contact form to the t-shirt shop website we are building.

The proverbial light went off and another small part of the front-end suddenly made sense to me.

I covered forms while learning HTML, but seeing how a small HTML snippet made up of label tags, input types, names and id’s could connect to a PHP snippet that Posts that name information filled in some huge blanks in my code knowledge.

Sorry if my code example is janky, I promise to get on Codepen this week and start showing some classy code examples.

Nonetheless, seeing how plain, old HTML “connects” with PHP really got the gears moving for me and made me even more exited to keep building on top of the HTML, CSS and Javascript knowledge I’ve accrued so far.

It’s great when one language you are familiar with gets built upon or connected to another you are just learning.  It reminded of how I felt when I learned that classes and id’s from CSS could be used in jQuery.

I know I have a ton more to learn, but little achievements and connections like these really make learning to code exciting every day.