[Learning] Am I in the right direction?

** This is my first post on this forum. I am not entirely sure if this is the appropriate section. My apologies if it is not.
/ (background info) I’m only fifteen years old, and I’m learning due to personal interest, not anything professional. I’m also taking programming & software dev. classes in high school next year that are two bells (1hr 36mins) long for a total of two years. They are actually college prep programs that allow you to earn college credit for completing them, and I plan on becoming a computer science major.

[SIZE=3] Hi. I’ve recently gotten into web design & development and have been trying to learn as much as I can. I already know HTML and CSS, and now I would like to learn PHP. I’ve researched a lot about whether or not I should actually learn it, and have gotten mixed reviews. I’ve come to the conclusion that I would like to learn the language, but the problem is that I’m not exactly sure how to go about doing so.

What I’ve looked at doing so far is the following:

  1. 200 video playlist on learning PHP - TheNewBoston
  2. Codecademy

The main reason I want to learn PHP is because it was recommended to me by multiple developers to learn before learning Ruby & Rails. After learning a bit of PHP, I’m going to start to learn Ruby & Rails, and hopefully Python afterwards.

What I want to be able to do in PHP is:

  1. Create a simple website with a login/register feature
  2. Last login/vist feature
  3. Create a functional contact form
  4. A few other basic/simple things…

Do you think I’ll be able to get a great understanding of PHP with the sources I mentioned above? If not, please recommend me sources that are beginner-friendly. Also, please leave a few tips/advice on learning PHP. Thank you all in advance.

[/SIZE]

Using videos for learning how to program is not going to be the most efficient use of time. Videos are good for some things such as a graphic design tutorial. But for programming, I think a book would be a better option for you. There are lots of places to find books on PHP, including here at the Sitepoint Store.

I learned PHP in bits and pieces, pretty much using whatever I could find on the web as learning material. This was not a good strategy. It left me with gaps in my knowledge as I pretty much scrounged for information when I needed it instead of sitting down and actually learning it. I already had some minor programming and database experience with Visual Basic, so the basics of programming I already understood. I have since realized that if you want to learn something, you should approach it academically, making a concerted effort at studying it, practicing it, and memorizing the important things just as you would if you were studying in college.

I think PHP will be a good starting point as all of the software you will need is free and PHP is widely used on the internet. There are also lots of free scripts like blogs, forums, content management systems, and more you can use and dissect the code to learn from. I would recommend you find a good book and buy it as you will be referring back to it often. If I have a recommendation, it’s to stick to the basics as you are starting out.

As for software, here are some recommendations I have that will get you up and running so you can learn PHP:

[U]XAMPP[/U] - This one package contains pretty much all the software you will need to run a development web server on your own computer and learn PHP. It contains an Apache web server, MySQL database, PHP, phpMyAdmin for managing your database, and more. All for free. If you are on Windows, getting all the current versions of the software working together will be next to impossible. Using XAMPP will save you a lot of time.

[U]NetBeans[/U] - NetBeans is a pretty impressive free integrated development environment (IDE) you can use to write PHP, HMTL, and CSS code and more. The IDE features a built-in web server you can use for debugging your PHP code, enabling you to step through your code line-by-line as it executes, setting breakpoints and examining variable values if desired.

Using videos for learning how to program is not going to be the most efficient use of time. Videos are good for some things such as a graphic design tutorial. But for programming, I think a book would be a better option for you. There are lots of places to find books on PHP, including here at the Sitepoint Store.

This is exactly my feeling and experience!! I watched some Lynda.com videos on PHP, JS, HTML, CSS, but just found it’s very shallow! Just a basic introduction to the subject!!! Now I realized I MUST read one or two or three GOOD BOOKs on each subject!!! After finish reading a great book, you will feel much better!!!

[SIZE=3]First, thank you for taking the time to reply to my thread. I’ll take your advice about not using videos to learn programming. Could you possibly recommend me a book or two that I could purchase on Amazon or possibly check out at a library? Do you recommend continuing with Codecademy (I’ve finished the Intro, Conditionals/Control Flow, Switch, Arrays, and For Loops)?

Also, I probably should have mentioned my experience. I’m actually very familiar with XAMPP (and IIS), as well using things like phpMyAdmin & Navicat to manage databases. I’ve looked at PHP code, but never actually wrote my own, let alone learn the language. I’m also experienced with Lua.

If anyone else would like to give me their opinion, I’d be glad to read it![/SIZE]

I would dive straight into Object Oriented Programming if I was you. I have seen a lot of tutorial videos, blogs and other stuff that gives a really bad instruction based on procedural code that is either outdated or really bad practice in general. I would start with PDO’s and the MVC pattern. Both of these, in my opinion, give you a good base of OOP code and how to separate your HTML, PHP and database logic.

I also think there is not much point in buying books because you can get the same, if not better, learning online for free. Some places I would look is stackoverflow. Although this is a help forum type website the members do give some great explanations on different subjects from a variety of perspectives. For example this one on PDOs is very informative. http://stackoverflow.com/questions/13569/mysqli-or-pdo-what-are-the-pros-and-cons

I noticed you mentioned thenewbostons library of PHP tutorials. I too watched all of these a long time ago but I wouldn’t waste your time on them because they were made so long ago most of the tips are outdated.

Hi xlChris!

Welcome to the wonderful world of Web application development :wink:

I think that learning to program for the Web is different than just “learning how to code”.
Learning the stuff you did with Codeacademy like control flow, etc. is a good thing. It will give you basic knowledge you’ll need to start to program applications like mobile apps, desktop apps or Web applications.

Now, Web applications are different than coding for desktops or mobiles. Why? One of the main difficulty is the HTTP protocol which makes the coding a little bit harder and also “wider”. You need to know what is a request and a response. What are cookies. What is the client side VS server side because, well, you’ll need more than one “language” to program a Website (HTML, JavaScript, PHP, SQL for example. HTML and SQL are not really languages BTW). Also, the fact that there is a lot of external data sources that you can use like Web services, XML, APIs in JavaScript… and a lot of other important concepts that are, unfortunately, rarely taught in tutorials that teach how to start to code in php. IMO, you should learn at least the basic concepts around HTTP before starting to code in any Web languages.

I made a small list of different tutorials you could read to understand Web development before starting to code in PHP:

HTTP basics :

Client side VS server side:

http://programmers.stackexchange.com/questions/171203/what-are-the-difference-between-server-side-and-client-side-programming

Cookies :
http://www.nczonline.net/blog/2009/05/05/http-cookies-explained/

Sessions :
http://stackoverflow.com/questions/3804209/what-are-sessions-how-do-they-work
http://stackoverflow.com/questions/8901884/what-is-the-scope-of-an-http-session

HTTP methods :
http://www.tutorialspoint.com/http/http_methods.htm

Now, when you understand a little bit more the HTTP protocol, you’ll be ready to code with PHP on the server side… :wink:

Here’s one good PHP resource to start with:
http://www.phptherightway.com/#php_paas_providers

Some good tutorials I found on tutsplus.com:
http://code.tutsplus.com/tutorials/30-php-best-practices-for-beginners--net-6194
http://code.tutsplus.com/tutorials/quick-tip-7-super-handy-php-functions-for-beginners--net-25937
http://code.tutsplus.com/tutorials/object-oriented-php-for-beginners--net-12762
http://code.tutsplus.com/tutorials/the-best-way-to-learn-php--net-22287
http://code.tutsplus.com/tutorials/20-all-too-common-coding-pitfalls-for-beginners--net-27963
http://code.tutsplus.com/tutorials/20-ways-to-save-kittens-and-learn-php--net-17889

Hope I helped a little bit. Don’t hesitate to ask me any question you might have!

Good luck and happy coding!