Review: PHP For Absolute Beginners
Ian Waugh tries his hand at PHP
| Product | PHP For Absolute Beginners |
|---|---|
| Company | Apress |
| Web | www.apress.com |
| Price | $39.99 £24.99 |
| We like | Step-by-step programming examples |
| We don't like | Blog project not very exciting |
| Rating | 7/10 |
| Requirements |
PHP is a server-side scripting language which means it works on the server holding a web site, for example, before passing the results to a browser. A client-side language such as CSS or JavaScript is executed by your browser to format web pages or create animations.
The benefit of server-side scripting is that it's harder to interfere with making it more suitable for handling sensitive information, making changes to database information and so on.
You can do lots of neat stuff with PHP, but even if you don't want to write your own code, it's used extensively in Wordpress so if you want to edit Wordpress Themes, for example, a knowledge of PHP will help enormously.
My Own Server
Coding is done by installing XAMPP (a free download) which offers easy installation of Apache server, PHP and MySQL on your computer so you don't have to practice on a 'real' server.
It's not easy, writing a book about programming for absolute beginners. There are so many aspects you need a degree of familiarisation with before you can do much more than print 'Hello World'. There's the basic syntax, expressions, variables, arrays, functions, operators and so. A couple of line of code could incorporate several of these so 'gentle introductions' to programming are not easy.
PHP For Absolute Beginners tackles the problem by listing the basics, each accompanied by a few lines of code you can enter to prove the result. It's easy and it works.
However, the book still goes through all the basic functions of the language, with examples, often adding to what's gone before. It's essential information but you will have to work through it carefully to get the most from the book.
Build It And They Will Read
Rather than provide a series non-related programs, the code builds towards the creation of a blog program.
After the basics, chapter 4 begins coverage of databases and MySQL, again with coding examples that build on each other. Subsequent chapters cover creating an entry manager, adding support for multiple pages, updating and deleting entries, uploading images, syndicating your blog with RSS, adding a commenting system, and adding password protection.
The final chapter adds some finishing touches such as validating an email address, saving comments in sessions, adding error messages, adding a 'Post to Twitter' link, and some basic spam prevention.
Although the idea of actually building something useful - the blog - is a good one, it's difficult to see how practical this is will be when there's already the far more sophisticated, secure and free Wordpress software plus many other blogging platforms. However, you will be able to use your knowledge of the language in other projects.
The book, unfortunately, does contain some typos which could cause confusion for the beginner. And although it is billed as being for 'absolute beginners', a little knowledge of programming, however small, would be a great help in understanding programming conventions. A smattering of HTML (and, ideally, a touch of CSS) would be useful, too, as PHP is used in conjunction with HTML.
PHP For Absolute Beginners will require some dedication to work through. Although you won't quite be a PHP expert at the end of it, stick with it and if you're able to follow the programming you will have picked up an excellent knowledge of PHP.
Check out the Amazon links, too, where you'll find the book currently discounted by 34-50%.

