For this week's Plus 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 PLUS membership now!











User Comments
( ADD YOURS )Saro February 25th
Nice tutorial Jeffrey!
( )Benjamin Reid February 25th
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.
( )insic February 25th
Look nice!. too bad for me im not a plus member. hmmm im thinking if i have to spend my $9 dollar for this.
( )Fawaz February 25th
This is not in the plus content yet.
( )Thomas February 25th
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).
( )Gareth February 25th
Where is it?
( )Shane February 25th
I’m sure the members will love it.
( )saurabh shah February 25th
looks good… too bad for me im not a plus member.
( )Jeffrey Way February 25th
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.
( )Alex Hughes February 25th
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…
Dan February 25th
Ironic – this is the exact project I’m writing to give my PHP/AJAX skills a shot in the arm
( )michael February 25th
exactly what i’m looking for..
this one got my signup
btw.. jeffrey, keep it up
( )never missed a tut from you.
Jeffrey Way February 25th
@Michael – Thank you.
( )Duncan February 25th
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’ ?
Martyn February 25th
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!
( )BazDeas February 25th
80 minute in-depth screencast? You’re getting even closer to persuading me to signup for tuts plus. More quality screencasts please!
( )Phillip Raffnsoe February 25th
Hell Yeah! I was just beginning to worry if my 22$ didn’t go to any nettuts+ tuts :b
( )M.A.Yoosuf February 25th
@Jeffrey Way: enable the corn job in the web-server, hope you will know that
( )Abraão Coelho February 25th
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?
( )Jeffrey Way February 25th
@Abraao –
If using Firefox, press “Control -” to zoom out. You can then switch to Full Screen if you like.
( )Corey February 25th
Is there a demo? Or is that also only available to Plus users?
( )Jeffrey Way February 25th
@Corey – The demo is available to plus users. That’s why I used a video here.
( )Doug February 25th
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…
( )Jeffrey Way February 25th
@Doug – No one is forcing you Doug.
Just to clarify, you get 3 plus tutorials.
( )David February 25th
puh
I will charge $2 to show you how to build.
( )monaye February 25th
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.
silent February 25th
@Jeff:
( )This might be what you need:
http://blog.5ubliminal.com/posts/missed-schedule-future-posts-scheduled-mias-wordpress-plugin/
Jeffrey Way February 25th
@Silent
Thanks! I’ll check it out.
( )ThE_OwNeR May 15th
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 May 15th
Whoops sorry, i just say that the last -> wasnt in your script.
Now i get the error of a $end
And i placed the } at the same spot as you
Darn i hate debugging…
ThE_OwNeR May 15th
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
yeah i feel great now!
aperta February 26th
Haha .. one again thank’s
( )Kevin Jensen February 26th
Yet another sweet tutorial and screencast, Jeffrey. The PHP = Awesome, the jQuery = crazy and the ajax = crazy awesome. You’re the freaking man. =P
( )klaus February 27th
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
( )stenbom February 28th
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 May 15th
Agreed, i just signed in today, started this tutorial and i really understand what he is doing! Im learning!! JEUJ
( )Jack Franklin February 28th
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.
( )Chris February 28th
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.
( )Andy March 1st
amazing
( )ThE_OwNeR May 15th
Hi, im just new and signed up today. But i cant access the Member area just yet?
( )Maxime June 9th
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!
kcmartz June 12th
I don’t see the tutorial!
( )Maxime June 15th
Hi, I solved it myself, apperently the webserver I use does work on port 3306 instead of 3307 with mysqli.
( )Then everything worked fine!
Jimmi August 3rd
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.
rcb August 8th
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
David Moreen October 22nd
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;”?
( )