Well, I looked through the "Sticky"s, and saw a lot of good sites, but I’m hoping to get one, or two answers to get me in the right place.
I already know a lot of:
[list]
[]HTML
[]DHTML
[]JavaScript
[]VBScript
[]ASP (Enough to get by)
[]And others
[/list]
But I have not yet had a chance to really learn any PHP & mySQL.
Ironically, I have them both installed, and running on my Apache Server, since I (was) using phpBB. But I want to know more… I want to be able to build a site from scratch (using DreamWeaver is good, too), which uses a mySQL database, and PHP to render the pages. Where is a great (perfect) place to start? What tutorial/book/site is the ABSOLUTE Best Place to Start? All the ones I’ve actually looked at either: (A) Have too little information, or (B) Assume I already know the basics.
Someone have a good answer for me? Or should I just browse the aforementioned tutorials some more?
While the online manual at php.net is not always up-to-date in it’s documentation, and sometimes is ahead of the general curve in updated functions, the user submitted data at the bottom of each function page is the best treasure trove on the net for beginners and advanced php scripters alike! There you will find info about bad info in the documentation, some better user submitted functions, and about a zillion different methods for putting the functions to use.
If you prefer the walk-me-through-it method of learning, I always vote for O’Reilly books on any programming subject!
One important thing to keep in mind, each server has it’s own unique build of PHP, and as such has configurations that may not work with a particular code you are testing out. Become familiar with PHP’s configuration settings and what they affect, and create a php info page <?phpinfo();?> so you can see the settings of your server. I’ve seen many postings on php forums, some lasting for pages, where someone could not get a certain script to work, and after several days of frustration they find it is a simple configuration setting!
I started with PHP By Example by Tony Butzon. It is a really great book. It takes you all the way from writing your first php script through making mySql databases and using sessions and cookies and also shows how to upload files through php. It’s a great book, I would suggest it to anyone (unless i really hated them hehe – then i’d think of something more creative)
PHP/mySQL is really a nice skill to have. Good luck
Yep, there are a few things that can really screw you up. register_globals - if they are off and you are trying to use them, not that you need to, but some scripts, like osCommerce, use them. magic_quotes and also php safe mode on, these kinds of things you need to look for, but the online docs tell you if they rely on or are affected by any of the php settings.
I will have to disagree about the online docs. They are up to date, and though some of the commentors have pointed out “work a rounds”, that doesn’t mean it’s the docs that are out of date, but that php has not been updated to reflect new thoughts.
Books I find are usually a bit behind. A book published in 2003 was written in 2002 more than likely, for example, which means it may not point out the changes in code from php versions > 4.2.1, which changed several things. Newer books written no later than last fall will be up to date, pretty much.
But the online examples are the best source of examples. Even after owning several php books I find the online docs the best source for answers.
ah thanks… i also heard somewhere that O’Reilly books are also good… someday, on a new subject matter for me, i might buy… but for now, im having fun reading Wrox’s… anyways, O’Reilly has always been on the top of my list
comparing Sams teach yourself PHP or something, i find Wrox’s much better…
The main functions are usually up-to-date, but many of the modules are not, for example the Ming SWF functions are way out of date.
I’m not sure if the module dev teams are supposed to submit updates to the docs with each new release, but the dev team at Ming mostly uses C, so they don’t seem to anxious to update the PHP docs.
There are other module examples, GD vs GD2 comes to mind, but all in all, the online docs are absolutely the best resource for PHP on the net!
If you are going to use Flash with PHP, Ming is a great module!
In fact, I don’t use the Flash IDE anymore (not since before MX came out), I create SWF via Ming and love the freedom from Flash’s cumbersome interface!