Learning php?

They have: 18 posts

Joined: Apr 2006

where and how did you guys learn php and or mysql? im really intrested in learning, and it would help my forums out a lot

They have: 8 posts

Joined: Sep 2005

Every time I'm asked this question, I have one answer: Books.

Online tutorials will not and can not even compare to the quality of training you'll get from a good how-to book.

Dummies FTW! PHP and MySQL for Dummies

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

I think it also depends on your pre-existing knowledge of programming logic and design. If you already know another programing language, you'll find the online manual sufficient.

Mark Hensler
If there is no answer on Google, then there is no question.

He has: 1,758 posts

Joined: Jul 2002

I was taught Perl in my job and the move to PHP isn't too difficult as the basic syntax is pretty similar. Just bought a couple of books and followed them through, then started looking at other scripts and stealing bits of code until I understood enough to write entire scripts myself from scratch.

I agree with TRS2988, books are probably the best learning aid, and they're always around when you need them.

Andy

timjpriebe's picture

He has: 2,667 posts

Joined: Dec 2004

I did pretty much the same as Andyk, including the move from Perl to PHP. However, I still haven't bothered to pick up a book, as I just haven't had time to go through one in detail. I've just checked online when I needed to know how to do something specific.

They have: 18 posts

Joined: Apr 2006

lol ya, like me with other programming languages

Well i know html and css, is it a lot harder?

sublimer's picture

They have: 41 posts

Joined: Aug 2006

dani190 wrote: lol ya, like me with other programming languages

Well i know html and css, is it a lot harder?

yea, but atleast you have a foundation and understand that the code has to be percise or else it wont give you the desired result.

books are good, buts its even better if you know someone who can tutor you.

i kinda taught myself php and mysql. i had 2 friends who could help me, but i would go to hotscripts.com and study the code to determine how things worked and what did what.

also have formal training in other languages helps like BASIC, C++, C# or J#.

-drew
:jump:

demonhale's picture

He has: 3,278 posts

Joined: May 2005

yep a little harder if you dont have programming background with at least pascal or basic... I have several prog background but I had to get a book to at least get my PHP basics right...

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

HTML and CSS are not considered programming languages (by the strickest definition), rather they are markup languages (which contain no logic - namely: sequential, conditional and iterative control structures). If you do not have previous experience with programming logic, then this may be something that takes a little work to wrap your head around.

Mark Hensler
If there is no answer on Google, then there is no question.

He has: 31 posts

Joined: Jul 2006

O'reilly books are good for programming in php/perl.

He has: 57 posts

Joined: Apr 2005

I tried a couple of books. I finally learned when I read "PHP and MySQL for Dynamic Websites 2nd edition by Larry Ullman" (http://www.dmcinsights.com/phpmysql2/)

It really is a good book.

He has: 698 posts

Joined: Jul 2005

I haven't used a single book yet. I started with very basic tutorials that I found on the net, and then I moved into the official manual once I was comfortable moving on. Smiling

Kurtis

They have: 7 posts

Joined: Aug 2006

I took an undergraduate course in Fortran back when computers filled rooms and some still used vacuum tubes. Programming is mostly a way of thinking. You must be logical and understand that that the stupid machine will do exactly what you told it to do, not what you thought you told it to do. If you can break a task into a series of simple steps, you can program.

I taught myself to program in assembly, PLM, Pascal, C, Perl, PHP and Javascript when I needed to use them. You may need to read and follow a book on your first programming attempt. Later you will need a good reference book where you can find the syntax, structure and available tools (built in functions and features) of your programming language. I find that online guides and help files are useful to refresh your memory, but a good comprehensive text is really needed to understand the detail you will need to program effectively. I don’t think that I have ever read and followed a programming text book, but it seams that I am on the verge of wearing out the index pages of several of these books.

Where do you find good programming books? Go to your library and check them out. Or better yet go online and have them reserved for you at the library. Check out as many as you can and try them out. If you find one or two that you really like buy the latest version for your library. I tend to like the O’Riley publications and many books with the word bible in the title. You will be the best judge,

The next thing you need to do start with a small code segment and execute, execute, execute. You will make a lot of mistakes simply make a change and try again. If your error messages are cryptic and hard to understand you may need change your compiler or interpreter for one with better error reporting. Use an old programming trick to help debug your code. Use print statements to display the variables and branches that your code is taking. Even the fact that one print statement works and the next fails helps you locate your mistakes. When the error is corrected remove or comment out the extra print statements that you added.

PHP has become one of my favorite languages because it displays the line number of your mistake when it fails to execute. All you need to write HTML and PHP is a website and a text editor which displays line numbers. There are a number of free ones available.

Busy's picture

He has: 6,151 posts

Joined: May 2001

Do a search for 'PHP School' (no quotes) i've lost the link, but is a good site (use the bits at the bottom and ignore the adult content links) teaches PHP/MYSQL with homework, the courses are oldish and do miss a bit but with books and other sites can be more than enough to get you going.
The good thing with server side is it either works or it doesn't and there are so many ways to do things.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.