8th June 2010 10:24 pm
First Steps With PHP
I’m currently working on my very first website for anyone other than myself. It’s a simple brochure-style website advertising a friend’s chalet at a seaside resort, which she wants to be able to rent out, and includes a simple contact form so that people can get in touch to ask questions or make a booking enquiry. Now, at present Python is the only programming language I know at all well that’s useful for server-side scripting, but I decided to have a bash at building it using PHP, since that’s pretty well supported and there’s loads of tutorials and resources for teaching PHP to newbies, as well as innumerable third-party scripts and libraries. Also, PHP’s such a popular language that you can’t really get away from it if you want to get into web development - I see loads of PHP jobs advertised but very few Python ones. So I figured it’ll be useful to have picked up a little PHP.
I got the form working, and I’ve added reCAPTCHA support to it to help prevent spam. All in all the form is working well, and it didn’t take a great deal of PHP knowledge to write the script. I’m already pretty confident that it’s a language I can work with in future, possibly even on a professional basis. That said, I can already tell that I will never like working with PHP as much as I like working with Python - the syntax is far less elegant than that of Python, and the object-orientation looks and feels much more clumsy to me.