I've been progressing in my PHP book, although I still haven't gotten much further than the first example code (order processing without MySQL connection) - but I've added some validation to the input like catching zero'ed fields, negative input and such.
It brings back memories - yikes. I'll probably have a gigantic nightmare tonight when I (mentally) start testing conditions to see if all exceptions are caught.
Anyway, if you want to play around with the script, go here.
63 lines of code, "just" to do something you could do easier on a calculator, it makes me wonder. On the other hand, it's a great way to get used to the syntax (arrggh, those damn ' instead of ") and to omptimize code later on. Strangly enough, I've never been good at coding myself, but I rocked when it came to optimizing code someone else wrote.
Note : after I posted this, I realized that at least one condition was not handled the way I think it should have been. So I dove back into the code to fix it, but after staring at the code for 10 minutes trying to get the exact conditional if that I needed, I gave up. I might look at it again tomorrow, or somewhere next week. Only 820 more pages to grasp and store in my brain :)