Hi all
I'll be as succinct as possible.
I have a PHP3 book called "Professional PHP Programming" by Wrox Publishing
www.wrox.com . Seems to be very extensive and cost me a packet so I am loath to just stop using it.
Now I am aware of a few differences ie in PHP4 you need to call form variables with $_REQUEST["variable"] or $_POST etc instead of just $variable in PHP3.
This seemed straight forward enough, so I just got on with it and did more examples. The fact I had to change these things seemed to grant a greater understanding so it was all good.
Now the further I go I find many more inconsistancies, ie no boolean variable type in php3 but php4 seems (in my limited understanding) to be recognizing them, at least the isset() function as the example uses (taken directly from the book) does not work correctly.
Code:
<?php
$avail = isset($avail); // Convert to Bool
echo ($_POST["avail"]); // Prints 1 if checked
// Prints 0 if unchecked
?>
This prints "on" and not "1" if check box is selected but fails if not checked.
Escaping certain characters seems different as well. I could make a few more examples but you get the drift im sure.
Directives in php conf file are default for security/speed as suggested by php readme.txt.
I guess what I'm asking is will it be worthwhile to continue as I am, or will I just confuse myself further? Especially anyone who has used this particular book who migrated from ver3 to ver4.
Any suggestions for a ver4 book (if that is what is suggested) would be appreciated as well. Assume I am a novice for the purposes of book selection.
I have seen a book called Sams teach yourself PHP4 in 24 Hours. Seems to good to be true, thoughts on this book please.
Regards
Allan