If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

In my case there is 32 fields which are identical to this code only diffrence is the id changes example:"p512_1_1, p512_1_2, p512_1_3 ... and also changes p512_1_1.tooltip, p512_1_2.tooltip, p512_1_3.tooltip ..."
Also i get using php which field is not empty and place item.
but when i dragdrop my items on fields it naturaly dosen't save if i dropitem on diffrent field. So i tried to identify if my field:

Code:

if(isset($_POST['p512_1_1'])) echo 'update mysql';

But there is problem i tried using $_POST,$_GET nothing helped to identify in which field the item is placed and which field items location we need to update in mysql. So do you know any ways? how to make it work?

Your top code section is not ajax; it's simple javascript and it has nothing to do with your php or html. Your two functions call a third function which you do not show.

In your html you use position:absolute; but never position it. The onMouseOver may never occur since your image looks like it covers the div. (may want to force image to confine itself to the div.

if($p512_5_2_image != NULL) is curious because if it is NULL you get an error and you have no instructions for it.

I find it hard to understand what your trying to do. In your last line you use words you do not define:
what is "field" and "item" in " in which field the item is placed"
and what do you mean by "field items location"
that you need to update in mysql. Which you just bring up now!

Please just use words to tell us what your trying to do or give us complete code or an address of your site.

Last edited by sunfighter; 03-18-2013 at 04:14 PM.
Reason: added last line

Users who have thanked sunfighter for this post:

http://postimage.org/image/z6tsz5369/
This is inventory what i am using as you can see there are posted items in fields. I did the part which checks if the current slot in database is empty or not. If slot is with item it inserts this code:

So inventory shows which item is in what field also which fields are empty and i can dragdrop my items on inventory. But ofcourse when i change item location or another words do dragdrop on diffrent field it stays there but when i refresh page it naturally will go back to the field which is in database. So how can i identify in which field i draged the item and update mysql with the data so when i refresh page it will be there where i dragged it.