Jump to content

PHP ajax/jquery


richarro1234

Recommended Posts

Hello there,

 

Im trying to create a list of items that appear for a user (abit like a todo list) i have them all added to the DB and displaying on the page.

 

Im also trying to make it so there is a checkbox next to the item on the list and they can check it and it will update instanly without having to change page, it will instead change to a tick rather then a checkbox, then if the page gets reloaded by the user i can add some php code so it will say complaeted or show a tick depending on the answer in the database.

 

Now the problem is i cant seem to find any thing that works like that and wondered if anyone had something similar or knew some code to make it work? the list is stored in the DB with just an A.I number and the name of the item and im using the item ID to save which items have been completed and which ones havent.

 

So also, how would be the best way to store such data (which user has completed it and who hasent, without having a seperate entry in the database for each user and each item (theres 60 items on the list)

 

Thanks

Rich 

Link to comment
Share on other sites

For storing the completed task list, I'd create a secondary table (completedTasks, maybe) and store the user ID and task ID. Only store a record if the task is complete - that way a simple join in your query will let you know know what's been finished and what's not. If you want, you could include a status column so that you could later allow the user to track percentage done, etc.

 

As for the rest of your question, let us see your code as it stands now. It's difficult to offer advice and help if we don't know the starting point.

Link to comment
Share on other sites

How many more time times do you intend to post this same question (in contravention of forum rules)?

 

You have answers here: http://forums.phpfreaks.com/topic/296354-need-some-help-please/

 

its actually different. this was about making the ajax/jquery calls and having it change to a tick or something saying it was completed, the other post was about php and mysql on how to make the same list appear for all users and make it so it was a personal list rather then having 1 list show for everyone. just whilst were being snarky :P

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.