What Happened? Formerly “Learning PHP – Part 4″
A Burmese Pagoda … I guess (at least that's what the limited information on The Commons seems to indicate)
Well, it's quite evident that I completely stopped posting. I've actually started a number of posts over the last year, but put off finishing them. The main reason for this was that I started out well ahead of what I was posting about. I thought it would be more interesting to cover it all step by step, but found I was much more interested in actually working on projects than I was writing posts.
That being said, I've still had some intention of coming back to posting. I've got a bunch of interesting stuff to put up. Notably, I've nearly completed a product management system that I've built from the ground up and I built a new computer just recently, which I took plenty of photos of. I'll probably come back to covering some basics again, but for now I'm going to switch to just posting whatever I'm most inspired to write about.
I've also learned a lot more about the inner workings of WordPress over the last year, so I'm interested in working on creating a theme and some plugins from scratch. It seems like somethign I ought to do (and would be fun) having spent plenty of time already tooling about with existing plugins and themes. Oh, and I switched domains from mokembo.com to michaelramsey.ca - yay for personalized domains!
The Learning PHP Post:
Having talked about some of the basics covered at the start of PHP and MySQL for Dynamic Web Sites it's about time to move on to the actual exercises. Starting out involved covering the creation of HTML forms, which I didn't really talk about in either of my HTML Review posts. Submitting data to a PHP script from an HTML form makes sense as the first exercise since it's extremely basic and central to many possible things you might want to do with PHP.
Making an HTML Form
Here's the form: http://michaelramsey.ca/learning/form.html
For now, that's all I had for this post. I'm just going to leave this as is until I have the time and inclanation to go all the way back to stuff that, at this poinst, was more than a year ago.
Learning PHP – Part 3: Variables
Gen. Jose Hernandez (from The Commons)
Well, somehow I managed to let more than a month slip by without getting this post up. Between being quite busy for a lot of the time, and a bit of procrastination it was easy to fall behind. I've been making progress off and on through PHP and MySQL for Dynamic Web Sites, but with the extremely hot weather in Toronto lately, it has been difficult to get any reading done on the subway sometimes.
Scalar Variables
Variables are the subject of this long delayed post. Variables are used in PHP in much the same way that they are in virtually any other major scripting or programming language. Variables use in PHP is fairly informal. A variable's name must start with a dollar sign and be followed with a letter or underscore (e.g. $variable); beyond that it can be called more or less whatever you want. Unlike in some other languages, variables can be created on the fly, and don't have to be declared or initialized beforehand.
Learning PHP – Part 1: Getting Started
An Egyptian Bazaar (from The Commons)
Having finished off my HTML and CSS review and learning, I had a hard time deciding where to go next. Having already learned some JavaScript previously, I poked around in the W3schools tutorials for it, but ended up deciding to tackle PHP and MySQL.
Part of the reason I decided on PHP and MySQL is because I've had a book on the two technologies sitting around for some time. So I've been working my way through PHP and MySQL for Dynamic Web Sites (2nd Edition) by Larry Ullman. So far, in my humble opinion, it's an excellent book. I'm finding it is getting through the material at a good pace. The progression is quite logical from one chapter to the next, and the examples are quite relevant and useful. Since the book has been sitting around for awhile, it covers PHP 5 (which is now at version 5.3.6 a.k.a. PHP 6) and MySQL 4.1 (now at version 5.5). Obviously this makes it a bit out of date, but as far as I understand, the versions that I'm looking at are both still widely used, and the newer versions aren't a whole lot different.
Before jumping into the actual work I've done in learning PHP and MySQL, I figure I should give a bit of an introduction to what exactly PHP and MySQL are and what you do with them. The book also does this, which wasn't exactly that useful for me since I've got a fairly good undstanding of many web technologies, even if I don't know the details of how to actually use them.



Learning PHP – Part 2: The Basics
A papier-mache cow on Mrs Mellor’s car, 1944 (from The Commons)
Jumping into PHP hasn't been too hard for me. The book is aimed at people with a bit of programming/scripting experience, or at least a familiarity with the concepts. That worked just fine for me, since I have previously worked with VB a bunch when I was a teenager, and have had to hack bits of code here and there in the intervening years. So, the basics are more about learning the syntax and what sort of things you can and can't do.