Results 1 to 20 of 20

Thread: Learning PHP

  1. #1
    Join Date
    Oct 2005
    Location
    Widnes, England
    Posts
    595

    Learning PHP

    Hello all,
    I've decided to sit down and learn PHP. I would have started earlier but I never know where to start when creating anything. I'm used to coding in VB, which is easy as you start with a form and add the code.

    I'm trying to think of ideas for a first project. Here's mine so far:

    • Ticket System - Having a login for users would depend on difficulty.
    • To-Do List - Like a project to do list. Who needs to do what, where.
    • Broswer based game - User clicks a link and adds a guy to his army. Ca use the army to fight with others.


    Which do you thinks easiest or most fulfilling? Do you have any other suggestions or project ideas?

    Any advise for starting to learn PHP?

    Any project I make will be free for other users to use, and I would keep the project going with new releases, bug fixes, etc. I've always wanted to make a project a community would like to use, to receive some feedback from an end product would be a great thrill.

    I'm not a complete novice at this. I can fix simple php code errors and as stated previously, I work with Visual Basic at college.

    Thanks for all your help guys!

    EDIT: I'm obviously going to create a base, simple version of the project first. Then add to it and bug test it. I'd make sure it was as bug free as possible before releasing it.

    EDIT 2: Sorry for wrong forum. I guess it should be in Web Design & Content.
    Last edited by Kemik; 02-17-2006 at 05:04 PM.
    Sean

  2. #2
    Join Date
    Feb 2003
    Location
    Connecticut
    Posts
    5,460
    Wrong forum.

    Personally I would not make a community project until you've properly learned PHP. I've seen far too many "free" scripts, that are actually "please hack me" scripts.

    A to-do list would be best.

    Start off with a member system.

    Members sign in and see their to-do list. Let them add, edit, or remove items.

    Once you do that, let them sort and search items, categorize them, et cetera.

    The ticket system would be a good step up from the to-do list, and the browser based game should be put on hold for a while.

  3. #3
    Join Date
    Jun 2004
    Location
    North of some border
    Posts
    5,613
    Moved to Programming.

    Lois
    "Do what you can, where you are, with what you have." – Theodore Roosevelt

  4. #4
    To-Do List - Like a project to do list. Who needs to do what, where.
    This is a perfect first project actually - I did this when I first started as well.

    Here's my suggested progression:
    -Start really simple with a one-file script that POST's to itself and uses a flatfile for storage.
    -Modify this to use a database for storage instead
    -Think about separating the data fetching from the data presentation (ie, use templates)
    -Add in user registration / authentication with sessions and cookies
    -Build in file uploading/display, import/exporting data to a variety of formats (PDF, CSV, XML)
    -Build an administrative interface for handling user registration requests, changing the look and feel, etc.
    -Explore GD / JPGraph and add Gantt charts and other pertinent visuals
    -Experiment with AJAX - this is a perfect application of the technology (use it to enhance forms)
    -Take the code you have created and make usable classes/components out of it that can be reused in other projects.

    It was a great project for me (and its still evolving).. It will teach you a lot of different aspects of development and it is a logical progression for building web apps. One thing that would have greatly helped me is to get to step 3 a lot sooner. Once you see how much more efficiently you can work when you separate presentation from business logic you will move forward much faster.
    "The only difference between a poor person and a rich person is what they do in their spare time."
    "If youth is wasted on the young, then retirement is wasted on the old"

  5. #5
    Join Date
    Oct 2005
    Location
    Widnes, England
    Posts
    595
    So keep the website based around a template? So the script is eaily to intergrate into other sites?
    Sean

  6. #6
    That may be a nice side-effect, but its not the main purpose.

    The main purpose is to avoid this:
    PHP Code:
    <?php
    $var1
    =bleh;

    echo 
    '<html>';
    echo 
    '<head>';
    echo 
    '<body>';

    //more code
    ?>
    Or this, which is slightly better, but still bad form:
    PHP Code:
    <?php
    $var1
    =bleh;
    ?>

    <html>
    <head>
    <body>

    <?php
    //more php code
    ?>
    Basically, it will allow you to keep all of your code kept nicely away from your presentation, like which colors your alternating table rows are.
    "The only difference between a poor person and a rich person is what they do in their spare time."
    "If youth is wasted on the young, then retirement is wasted on the old"

  7. #7
    got to htmlite.com . they have a very good site if your are just learning the basics.
    Last edited by Koolaid1551; 02-18-2006 at 09:48 AM.

  8. #8
    Join Date
    Jan 2003
    Location
    MI
    Posts
    229
    I would suggest getting a good book that walks you through a project and actually walk through it entirely. Many good books will go through security concerns and such.

  9. #9
    ya books are good but before u get a book u need to understand the basics and not many books have done a good job about that.

  10. #10
    Join Date
    Feb 2005
    Location
    Delaware
    Posts
    587
    Koolaid. Not my post but thanks for a nice site

  11. #11
    Join Date
    Oct 2005
    Location
    Widnes, England
    Posts
    595
    Can anyone recommend a good PHP book? I'm looking at Amazon.
    Sean

  12. #12
    Join Date
    Aug 2005
    Location
    EIB Network
    Posts
    474
    BY GOD... IF THIS IS THE LAST BOOK YOU BUY.. YOU MUST BUY THIS BOOK:

    PHP and MySQL For Dynamic Websites by Larry Ullman.

    I will tell you right now, there is not a better "starter" php/mysql book than this one. There are so many bad books/tutorials out there that mess people up BAD. This book is a godsend and I hope that you trust me, because I was once like you with the same purpose for development, to buy this book and read it through. After you read this book, everything else that you want to learn after will be easy as cake because you have a solid understanding of not only the code, but the design strategies that real-world examples of things we all want to do.
    People train run out of Stubville.

  13. #13
    Quote Originally Posted by Jimerson
    Koolaid. Not my post but thanks for a nice site
    you are very welcome

  14. #14
    Join Date
    Sep 2005
    Location
    Albany, NY
    Posts
    3,956
    I would also suggest getting a book. I have used Wrox PHP 4 book with great success. It is a thick one, but easy to read with great examples.
    AYKsolutions.com - High Bandwidth Specialists - 10Gbps/20Gbps+ Unmetered & DDOS Protected
    Over 20+ Global Locations - Asia (Hong Kong, Singapore, Tokyo), Mexico, Brazil, India, Australia, US, CA, EU - Bare Metal and Virtual Cloud. All Managed.
    We are Professional. Painless. Polite.

  15. #15
    Join Date
    Oct 2005
    Location
    Widnes, England
    Posts
    595
    I was looking at Larry Ullman's book. I'll proberly order it tomorrow then
    Sean

  16. #16

  17. #17
    Join Date
    Aug 2005
    Location
    EIB Network
    Posts
    474
    Quote Originally Posted by Kemik
    I was looking at Larry Ullman's book. I'll proberly order it tomorrow then
    You'll be very glad you did!
    People train run out of Stubville.

  18. #18
    Join Date
    Feb 2003
    Location
    L.A. C.A.
    Posts
    346
    When I first learnt PHP I used Sams Teach Yourself PHP in 24 hours whilst looking at the tutorials for PHP listed on http://www.hotscripts.com/PHP/.

    Within weeks I was writing scripts and improving my techniques; developing guestbooks, gallerys, contact forms etc.

    You learn alot about coding from analyzing other peoples, download scripts you like and analyze how they work; its what students in security etc do to find flaws.
    WLKNS.co - A collection of my programmer thoughts

  19. #19
    Join Date
    Feb 2006
    Location
    Shanghai China
    Posts
    6
    May be to to list is so easy.

    I want to learn php too.

  20. #20
    Join Date
    Feb 2006
    Location
    UK, England
    Posts
    136
    Quote Originally Posted by hatoyu
    May be to to list is so easy.

    I want to learn php too.
    This does depend on what the "to do" list needs to do.

    The code can get complex and I agree with others, it will help you learn a considerable amount. You can move onto OOP in PHP and even other languages such as JavaScript to improve the interface.

    Learning more than one language at a time helped me personally (You may want to consider this). I started with PHP and not long after decided I wanted to play with JavaScript. Doing this helped (and still does help) me grasp concepts from both languages.
    "Sad, small, sweet so delicate, We used to be this dyeing breed" -- Taking Back Sunday - A Decade Under the Influence
    "If we cut out the bad, well then we'd have nothing left" -- The Used - Cut Up Angels

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •