I know how to get the position of a div using JS, I’m using Jquery’s draggable script, and have an event that when the person stop dragging that it should get the location of the div (top and left):
document.getElementById('object').style.top;
document.getElementById('object').style.left;
now the question is how do I get those coordinates into a php session…?
Maybe the best (easiest) option is to store them in a cookie. The cookie can be read by PHP if you like, but even if you don’t, you can still use the cookie again when the page is reloaded in the same browser.
If you want to store the value so it is kept too if the user logs in on another browser (or in a different session), you can store the cookie in a database.