New Plus Tutorial: How to Code a Fun To-Do List With PHP and AJAX

New Premium Tutorial: How to Code a Fun To-Do List With PHP and AJAX

DiggThis

For this week’s Premium tutorial, we’ll be working with many different technologies. Ultimately, we’ll be building a to-do list that will allow you, or your user, to create, update, and delete items asynchronously. To accomplish our task, we’ll be using PHP and jQuery’s AJAX capabilities. I think you’ll find that it’s not quite as hard as you might initially think. I’ll show you exactly how!

With an in depth tutorial, and 80 minute screencast, this one is not to be missed!
Sign up for a Premium membership now!

Preview

preview

Join Tuts Premium

For those unfamiliar, the family of TUTS sites runs a premium membership service called “Premium”. For $9 per month, you gain access to exclusive premium tutorials, screencasts, and freebies at nettuts+, psdtuts+, and vectortuts+! For the price of a pizza, you’ll learn from some of the best minds in the business. Join today!

  • Subscribe to the nettuts+ RSS Feed for more daily web development tuts and articles.


Related Posts

Add Comment

Discussion 46 Comments

Comment Page 2 of 2 1 2
  1. Saro says:

    Nice tutorial Jeffrey!

  2. Benjamin Reid says:

    Wow, looks very nice. I think tutorials like this are a great way to get people to sign up. Nothing so far has made me go “I NEED THIS” yet though this maybe just might.

    Looking forward for what’s to come.

  3. insic says:

    Look nice!. too bad for me im not a plus member. hmmm im thinking if i have to spend my $9 dollar for this.

  4. Fawaz says:

    This is not in the plus content yet.

  5. Thomas says:

    Is it possible to download the screencasts with a plus membership? This would be great, because I like to watch them whenever I want, even if I’m not online (e.g. on the train on the way to work).

  6. Shane says:

    I’m sure the members will love it.

  7. saurabh shah says:

    looks good… too bad for me im not a plus member. :(

  8. Jeffrey Way says:

    I’m so sorry everyone. WordPress is being really strange lately. The admin panel won’t allow me to schedule posts anymore. When I do, the scheduled time comes and goes, and then it says “Missed Schedule”. This is the second week in a row that it’s happened.

    I just manually posted it; so it’s available now! I hope you enjoy it.

  9. Alex Hughes says:

    This looks great and the ajax updating of databases is exactly what I needed, but still i’m just torn down the middle.
    Tutsplus or Pizza… mhmm…

  10. Dan says:

    Ironic – this is the exact project I’m writing to give my PHP/AJAX skills a shot in the arm :)

  11. michael says:

    exactly what i’m looking for..
    this one got my signup ;)

    btw.. jeffrey, keep it up ;)
    never missed a tut from you.

  12. Jeffrey Way says:

    @Michael – Thank you. :)

  13. Duncan says:

    Great tut again Jeffrey!
    But I was wondering, when can we expect the second part of your ‘How to build a login system for a simple website’ ?

  14. Martyn says:

    This is defiantly one of the best sites I’ve come across for screencasts. They help me learn so much more easily than just reading paragraph after paragraph.

    Keep up the awesome work guys!

  15. BazDeas says:

    80 minute in-depth screencast? You’re getting even closer to persuading me to signup for tuts plus. More quality screencasts please!

  16. Phillip Raffnsoe says:

    Hell Yeah! I was just beginning to worry if my 22$ didn’t go to any nettuts+ tuts :b

  17. M.A.Yoosuf says:

    @Jeffrey Way: enable the corn job in the web-server, hope you will know that

  18. Well, it’s not possible to download and i can’t watch it online either because the screen doesn’t fit… what should I do?

  19. Jeffrey Way says:

    @Abraao –

    If using Firefox, press “Control -” to zoom out. You can then switch to Full Screen if you like.

  20. Corey says:

    Is there a demo? Or is that also only available to Plus users?

  21. Jeffrey Way says:

    @Corey – The demo is available to plus users. That’s why I used a video here.

  22. Doug says:

    Looks like a good tutorial, but I’m not paying $9 a month just to have one “plus” tutorial a week.

    I’ll use my money elsewhere for something good…

  23. Jeffrey Way says:

    @Doug – No one is forcing you Doug. :) Just to clarify, you get 3 plus tutorials.

  24. David says:

    puh

    I will charge $2 to show you how to build.

  25. monaye says:

    Great sCast. Learned something again.
    Just feedback
    >> Video was slower than voice ( Just me??)
    >> next time, like to see Ajax on when you add new “to do” list too.

  26. Jeffrey Way says:

    @Silent

    Thanks! I’ll check it out.

    • ThE_OwNeR says:

      He jeff,

      Ehm….I need some help because somehow; i have the exact same code as you but it always gives me this error:

      Parse error: syntax error, unexpected ‘(‘, expecting T_STRING or T_VARIABLE or ‘{‘ or ‘$’ in C:\wamp\www\Portfolio\todo\index.php on line 22

      Line 22:
      $results = $db->mysql->query->($query);

      • ThE_OwNeR says:

        Whoops sorry, i just say that the last -> wasnt in your script.

        Now i get the error of a $end :P And i placed the } at the same spot as you :P Darn i hate debugging…

      • ThE_OwNeR says:

        Sorry last post:

        I found the problem, i’m using Dreamweaver and (i think) does not support EOD. So instead of <<<EOD i just a simple ‘ and at the end also.

        Now you’ll get another problem: the variable $title and $description.
        You’ll have to do this:
        ‘.$titel.’
        ‘.$beschrijving.’

        Im a n00b at PHP but i still knew how to fix the problem :D yeah i feel great now!

  27. aperta says:

    Haha .. one again thank’s

  28. Kevin Jensen says:

    Yet another sweet tutorial and screencast, Jeffrey. The PHP = Awesome, the jQuery = crazy and the ajax = crazy awesome. You’re the freaking man. =P

  29. klaus says:

    If it was possible to download the screencasts then that would be real value for money….

    But since i like “evanto” am gon support the biz.

    Thanks for the tutorials

  30. stenbom says:

    Guys, are you kidding me? Can you please stop complaining regarding a 9$ fee. Why don’t you just take your act together and go buy a book on the subject (50$+) and read that one instead, which will probably take you a good… week? Seriously, it’s almost free, Jeffrey Way holds a tremendously high class in screencasts, one of the best I’ve seen if not the best. Plus, you get more knowledge for a small price which in return means that you can charge more for your freelancing or agency work which in return means that you earn money on spending it wisely here.

    / Stenbom

    • ThE_OwNeR says:

      Agreed, i just signed in today, started this tutorial and i really understand what he is doing! Im learning!! JEUJ

  31. Signed up a while back have yet to watch the video – but will do when I can!

    And downloading the vids would be an awesome idea – if you could make them available for iPod Touch/iPhone that would be great ! (I spend 2 hours on a bus 5 days a week so I need some stuff to keep me going!)

    Jack.

  32. Chris says:

    I really enjoyed this one as well. I’m looking forward to getting the time to actually try it myself. The video was a little slower than the voice.

  33. ThE_OwNeR says:

    Hi, im just new and signed up today. But i cant access the Member area just yet?

  34. Maxime says:

    Hi it doesn’t work for me, I have problems with this mysqli syntax: function __construct() {
    $this->mysql = new mysqli(‘localhost’, ‘root’, ‘yourPassword’, ‘db’) or die(“problem”);
    }
    apperently I get some errors:

    Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2003): Can’t connect to MySQL server on ‘localhost’ (10061) in H:\Temp\u\UsbWebserver\Root\todo_list\db.php on line 7

    Warning: mysqli::query() [function.mysqli-query]: Couldn’t fetch mysqli in H:\Temp\u\UsbWebserver\Root\todo_list\index.php on line 33

    Notice: Trying to get property of non-object in H:\Temp\u\UsbWebserver\Root\todo_list\index.php on line 35

    So far I didn’t change anything on the code I got from you. What are the errors, I don’t know how to correct them.
    Anyway very great tut!!!
    Thanks a lot!

  35. kcmartz says:

    I don’t see the tutorial!

  36. Maxime says:

    Hi, I solved it myself, apperently the webserver I use does work on port 3306 instead of 3307 with mysqli.
    Then everything worked fine!

  37. Jimmi says:

    Nic tutorial Jeff. I’m glad i signet up.

    But try to sync the voice and video.
    The video is about a second after your voice.

  38. rcb says:

    Anyone have any thoughts?
    I don’t have much php experience–why do I get this message?

    Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /…/…/ver2/db.php on line 4.

    Line 4 is referring to:
    public $mysql;

    I’m running php5 on godaddy

    db.php:

    mysql = new mysqli(‘*****’, ‘****’, ‘****’, ‘****’) or die(“problem”);
    }
    } // endclass

  39. David Moreen says:

    Jeffery awesome tutorial so far. I about a quarter of the way into it and, executing the script I’m getting a PHP error on index.php. Cannot access private property Db::$mysql. Should I change “private $mysql;” in db.php to “public $mysql;”?

Add a Comment