Although this book is useful. I found the layout of the code very annoying. The page is split into two columns, with the code inline with the text, thus also flowing in the two columns... this makes for reading the code very difficult. Also Im no expert but I found some of the coding techniques very messy, for example his form validation, which can be done much neater than the example in this book. Another gripe, is he uses stupid variable names, which are totally none descriptive, for instance in clearly written code you might write $query he'll abbreviate it to just $q, also where everyone else would write $result he just puts $r, which if youre learning can be very un-helpful when trying to make sense of the example... coupled with poor layout, this book gives me a headache when trying to learn from it.
p234 example:
7. Add user to the database.
require_once
> ('../mysqli_connect.php');
$q = "INSERT INTO users (first_name,
>last_name, email, pass,
>registration_date) VALUES ('$fn',
>'$ln', '$e', SHA1('$p'), NOW() )";
$r = @mysqli_query ($dbc, $q)
YES! the code really is formatted like that!!! Its terrible. That query should be on one line, not spread over four. And try making sense of it as a beginner, when he uses $r and $q. I know what this all means now, now that ive coded many sql queries. But when I was learning, this book was a nightmare.
I use this book in combination with the Luke Welling, Laura Thomson "PHP and MySQL Web Development" book (which is a far deeper book IMHO - and much better laid out) along with examples on the web to get a better understanding of a particular area of PHP/MySQL I need to learn.
The layout for this book needs reviewing for the next issue - use the full width of the page guys!