mysql + php to make todo list

lieb39

Apple lover, PC User
Joined
27 Nov 2002
Messages
526
Hello.

On my system I have mysql and php with apache installed, no problems. Works 100%.

How would I make a webpage that gets infomation from a mysql database, and displays it. than at the bottem of the webpage it would have 2 input boxes, to add to the mysql document?

1. What I would like to do is have a mysql database, and on a webpage (php?) it would have 2 columns. One would be "Done?" and the other would be "Task". This would be a To Do list. I would like to make the 2 columns displayed, but in the "Done?" column, instead of a Y or N i would like a checkmark or a empty box (when its not checkmarked), and you could click on the checkmark if it's done.

2. Than at the bottem of the website I would like 2 input boxes, one being "Done?" and the other being "Task" you could fill these in, and it would add to the mysql document, and than reload the website so that new task is shown.

Now, is this even remotely possible? If so if somewould could tell me how, than WOW! but if not if someone could just post a link to show basically how to do this. If (in #2) the checkmark thing isn't possible, than a Y/N is alright.

Thank you very much,
 
Well it can be done and it is relatively easy (if you know php and html), i have several such things on my own site.

A good place to look for some nice simple code is
http://www.spoono.com/tutorials/php/
where you can find how to add and update mysql databases and other things
 
YOU ARE GOD!

Zedric,

YOU ARE GOD! IT IS EXALTY WHAT I AM LOOKING FOR! THANK YOU SO MUCH! ALL HAIL ZEDRIC!

Thanks SO much!
 
Problem...

I just tried it out on my active desktop... -->

When I check/uncheck or add a new task it opens a new window if the webpage is on active desktop. i plan to use this on my active desktop, how would i make it so it doesn't open a new window?

Another thing, you forgot to add a delete button...

maybe it would be better if you could check the boxes (beside the tasks) , than at the bottem of the page there would be two boxes, one saying "done" (that would trigger being done/ not being done) and another being "delete"

Thanks
 
When you add a new item, it opens up in the same window. i fixed that, however when you check/uncheck an item it opens a new window.
Fixed.

once i've got everything working, i'll post the final script (by Zedric) on, so all you guys can download it.

Update: Just need to get a delete button in there

help?
 
Working on the Delete button...

I didn't think you wanted one since you didn't say so... :)

Btw, did you try to remove the "Checkboc f*cks up" part? I wonder if it's my PHP that is acting up. I'm haveing problems with phpMyAdmin as well. Doubles everything in the queries. :(
 
Originally posted by Zedric
Working on the Delete button...

I didn't think you wanted one since you didn't say so... :)

Btw, did you try to remove the "Checkboc f*cks up" part? I wonder if it's my PHP that is acting up. I'm haveing problems with phpMyAdmin as well. Doubles everything in the queries. :(

If you just installed php 4.3.0 it could be that.
 
Nope, 4.2.2 running on RedHat Linux with Apache 2.0.40.

Here's the new script btw.
 
Here's the final (v4) version of Todo. Its a script that shows a todo list that can be placed on active desktop. Created by Zedric and edited by lieb39.

This is the NTFS version.

Let me know what you think of it.
 
You shouldn't release a final full of bugs. ;)

- Fixed a CSS-bug.
- Cleaned up some code
- Added helpful comments in inc.db.php
- Added SQL file! (again)

My PHP is really acting up! If I use ':s in the task they sometimes show up as \\' and sometimes as '. They change if I reload! *gaaaargh* :mad:

Anyway, here is TODO v5 (final?)

<edit>Aw crap, ":s don't work at all. Can you live without it?</edit>
 
I get

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in C:\Apps\Internet\Apache\htdocs\active\todo\index.php on line 61

on top of the bar.
Any idea why? =)
 
Hmm, I would guess you haven't set up the database correctly or the connection to it failed. Did you install the sql-file?
 
I have Apache, PHP and MySQL installed prior to using this script. Anything else I must do to setup the database to prevent

Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in C:\Apps\Internet\Apache\htdocs
\active\todo\index.php on line 61

=) And how to do it too =P if possible
 
- Get and install phpMyAdmin.
- Create a database called todo.
- Run an SQL query based on the .sql file in the zip file. Do this in phpMyAdmin.

Then try running the todo list in a browser first.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back