How to create an igoogle layout (drag & drop & store) using PHP and AJAX?

In igoogle, we can drag and drop modules, and then, if we exit the browser and open it again, the position of each module will remain the same. I checked a couple of things:

  • When you are not logged in, igoogle will save the position of the modules in my cookies (cache). Because if I clear the cache, it returns to its original position.

  • When I logged in, after positioning the modules, even I log out and clear my cache, if I log in again, the modules remain the same and not back to the starting position.

What I want to ask:

  • How to maintain the position of modules for registered users and not logged in?

  • Wong - the necessary skills? (I use php, mysql and jquery)

  • Are there any good tutorials that I can reference?

+4
source share
2 answers

Here's a very good tutorial: http://nettuts.com/tutorials/javascript-ajax/inettuts/

You will need to save the user data in the mysql table. Perhaps customize the column / row column in your mysql table with the associated content id. If you do not have knowledge of relational databases, it would be nice to start there. If you understand the basics of db, then this will be a simple update request to store cookie information based on a cookie that is outdated in the future.

If you allow users to log in (e.g. google), the use of cookies is optional (but may be useful), since you can use the div position data stored in your mysql table.

+6
source

Drag and drop logic

+1
source