Link to home
Start Free TrialLog in
Avatar of nightduke
nightduke

asked on

learn php and mysql

hi i wish to learn php and mysql.
anyone know where or how can i learn both of them?
thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of dkjariwala
dkjariwala

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mlessar
mlessar

A really excellent beginning book on php is
"PHP fast&easy web development"

It covers beginning php and then moves onto MySQL.

very simple, everything is laid out for you, and even the code that they used is provided on the CD.

Happy reading,
Mike Lessar
I hate to disagree with mlessar, but I would advise you NOT to get PHP fast&easy web development. I wrote a review of that book which I posted on the Amazon.com site, and have included here.  Considering that I pretty much lambasted the book, 8 of 8 reviewers voted it was useful to them.  I would heartily concur that in my experience Wrox press books are generally very complete.  Professional PHP programming is an excellent book, very clearly written and exhaustive.

-----------------------
Review of Php Fast & Easy Web Development

This is an interesting book, written with a casual easy going style that will no doubt appeal to some people, particularly i would guess, hobbyists who are trying to get a dynamic website with PHP up for the first time. Although the publisher Prima Tech doesn't provide any sort of skill level rating, make no mistake, this is a book for beginners only.

PHP fast&easy web development assumes that you will be using mysql as a database, which is fine, but not clearly stated on the front cover. The author has a website with some decent articles on using other databases with PHP which somewhat mitigates the issue.

One of the things that bothered me about PHP fast&easy is that the author seems relatively agnostic about what features of the language one *should use*. PHP is a highly flexible, loosely typed language with numerous pitfalls that a beginning developer can fall deep into, yet these areas are never acknowledged or discussed.

To illustrate this, a beginning section discusses the ways that PHP code can be intermixed with HTML, and the special tag syntax required. While she lists <? ?> as being an acceptable block, she never informs the reader, that they shouldn't use this syntax and should instead use <?php ?>. She then shows the use of the echo command for outputting text, using the " character to surround text, not mentioning that one can also use ' and that this helps avoid the perils of having to escape all instances of the " character when echoing embedded HTML.

In a later chapter the author shows how one could create some forms with the ability to create mysql databases and tables, never mentioning that a mysql user connecting through PHP with this type of access to a database is a huge security risk. She also illustrates the use of cookies, by setting a security variable of auth=yes, never covering how with PHP's automatic variable creation, anyone with a small amount of understanding of this feature could easily subvert this security scheme by passing auth=yes as a url parameter.

The first 50 pages of the book cover installing apache, mysql and php. This is great if you need this help, however, if you don't it's just filler in what is already a sparce tomb. The last 60 pages provide a tutorial in creating a primitive contact management system. This does a fair job of showing the basics of developing an online form based system, although I'd certainly prefer a more interesting sample applicaion, perhaps similar to the cd collection database used in earlier examples (mp3's come to mind).

Personally, I'd prefer a book that uses its source code to provide hints in regards to best practices, even if the concepts are beyond those which can be adequately dealt with in an introductory volume. All the source code in PHP fast&easy web development is of the rudimentary variety.

There is decent coverage of PHP's session capability. Unfortunately, things that might have been covered but aren't include: PHP's somewhat unusual variable scoping mechanism (globals aren't visible inside functions); user defined functions; the include function; PHP classes and objects; the power and use of regular expression functions; a normalized database (ie. use of more than one table) etc... you get the idea. PHP, like perl, is a swiss army knife, capable of many amazing things, and this book barely covers the spoon.

In conclusion, if you have even a modicum of programming background I suspect you will be sorely dissappointed in this book. If you're a rank beginner who wants to get a toe in the water with PHP, then you may find this a decent entry point. Expect however, to supplement the tutorials contained here with additional reference materials and reading.

Gizmola,

I would agree with you on the aforementioned book, that I suggested.  However, nightduke, did not mention his programming ability.

I myself personally utilize the Wrox library of excellent books, but I found the book that I mentioned as simple beginning point.

If nightduke is a beginner, most likely he would find a host that would have php already installed.

Nightduke, you should never rely on 1 book as your only reference source.  As you will find, many programmers have developed there own style of writing.  Some may be excellent and others may be full of flaws.

As you can see there are many places you can get information about programming php, many of the professionals utilize the Wrox series, because they are "very clearly written and exhaustive." ( to copy from gizmola )

Because to the amount of information that is available in the Wrox books, you may be inclined not to read and therefore miss out on the information available in them.  If you have a basic understanding, of php you will find yourself wanting to learn more and will read the Wrox series.

Just my $0.02

Mike