PHP has been an annoyance to work with, although I somehow managed to write something vaguely (useful?) with it – a ‘predictions league’ thing commissioned by a friend (whose site I somehow got roped into hosting). I actually managed to write this in a few hours as a first PHP/MySQL project which in my opinion is pretty fast considering I had to learn my way round PHPMyAdmin for a good half hour setting up the DB then start learning PHP starting from the MySQL end, learning the hard way that die(…) literally means the script, well, dies.
The requirements for the program was that people would log in / register and be able to predict scores on upcoming matches. Their predictions end up in a database, and when a match finishes, admin enters the results into another table in the database, at which point a script runs to compare each person’s predictions against the real result. A formula works out the number of points they get based on similarity to the actual score, and their points accumulate over the whole season.
Apart from some teething problems it seems to run OK. I only managed to work out cookies after it was launched, and a logout link was created a day after that. But overall, I’d consider it a fairly successful first project in PHP. The URL to follow if you’d like to make a prediction is http://gedanken.we.bs/wordpress/predictions/
By far the worst part of my experience coding this was the discovery that PSPad, a program I’ve had on my machine all this time but haven’t realised its potential PHP-wise, is an awesome editor for PHP. Oh well, bye then Notepad.