• 0

Learning PHP


Question

Hi all,

I have got the next 3 days off of work with nothing planned (middle of the week) so I figured this is a good opportunity to start learning PHP. Can anyone suggest a good project to start with? Like, try to make xyz and figure out the code as you go along.

I've never been good at learning languages from tutorials. I usually get bored creating lame "Hello World" programs so this is why I want to jump right in to the meat with a real (but not too difficult) project and just figure it out as I go.

Any advice is much appreciated.

Cheers,

Jordan

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Thanks for the responses so far guys.

I was thinking for a first project to try and make a web page that has a comment system. Would this be too much of a jump for a beginner? I see the w3schools tutorial goes in to using MySQL databases towards the end of it.

I really should have started today but got distracted with a new iPhone app :pinch:

Link to comment
Share on other sites

  • 0

Try coding a basic blogging CMS; it's what I'm doing to familiarize myself with PHP along with referring to W3Schools. It doesn't have to be all fancy, and it'll improve with your skill. Even if you don't need to use it, it's a way to get to know PHP/some MySQL.

Link to comment
Share on other sites

  • 0

Try coding a basic blogging CMS; it's what I'm doing to familiarize myself with PHP along with referring to W3Schools. It doesn't have to be all fancy, and it'll improve with your skill. Even if you don't need to use it, it's a way to get to know PHP/some MySQL.

I'm glad you posted because this is exactly what I was thinking but wasn't sure if I was getting ahead of myself.

Link to comment
Share on other sites

  • 0

Just don't learn from the Dummy books...Thats was how I started off. Bought PHP and Mysql for Dummies. I had better success from tutorials online than I did from that book...Though a good project is something like a forum, where you start off with basic features, and as you learn PHP, you expand on your project. Forces you to learn to be able to advance.

Link to comment
Share on other sites

  • 0

Nah, you're not getting too ahead of yourself, just remember that you won't be able to make the next Wordpress at first. Simply take baby steps and continue to improve your application. Also, I think you'll find PHP to be a pretty "natural" and easy to grasp language; it is in my case.

I'm working on a basic blogging CMS as well in my spare time (which I need to resume work on speaking of, it's still very primitive and I haven't worked on it in a while) and it can be found here. I'm working on implementing pagination, as well as giving articles unique IDs/pages that individual articles may be displayed.

Link to comment
Share on other sites

  • 0

Building a CMS is a great place to start. You will learn a lot by taking this approach.

I started off with Kevin Yank's - Build Your Own Database Driven Website Using PHP and MySQL, it's a sitepoint book and was recently updated. For me it was the only book I needed to 'learn' PHP and it will show you how to build a basic CMS. I progressed onto an Apress book called PHP 5 and MySQL From Novice to Professional which is another good book, but it's a more of a how to/reference book rather than a project book. I still go back to the Kevin Yank book from time to time. I often find that online tutorials do not have a well defined structure to them and hop and jump all over the place. W3Schools as suggested is another good reference, but it's just a reference.

It's pointless learning a language if you haven't got the mindset to think of how to approach a project and gauge what might required if you do this, or what might happen if you do that with PHP. Learning how to build a CMS is a great way of progressing this way of thinking particularly if it's aimed at multiple users with variing degrees of access or restrictions.

Anyone can learn PHP, but the beauty of it (and most languages for that matter) comes from combing its features in a meaningful way to complete a project you've set. The Sitepoint book will guide you in the right direction because each chapter builds upon the last until in the end you have a fairly comprehensive CMS that you can then build upon your self. One thing I would suggest you focus on while learning PHP, is to program securely with it. By it's very nature PHP can be used to produce slopply, insecure scripts and it will not guide you in the right direction. In other words you can be lazy with it and PHP won't care. You have to find out how to program securely with it and use the right functions that will aid you in writing secure scripts.

Link to comment
Share on other sites

  • 0

Thanks Dorza and everyone for your posts. I started building a CMS last night. I've got it now with comments, an admin page with login, in the admin I can add pages and users. It's all very sloppy though and probably not secure in the least. Feel like I need to start it over now with a cleaner approach and with security in mind instead of continuing to build on this mess.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.