This is a small Script for a new browsergame:
We need a simple php script using jquery or mootools (you choose) for this simple task:
A USER has serveral entrys in as MYSQL DB. Each Entry (Item) has its own picture from a fixed set of Images on a webserver.
MYSQL Table: USER:
USERNAME, USERID
MYSQL Table: ITEMS
ITEMID (Int), PictureFileName (Char 50), TYPE(1-9,Int), SORT (Char4)
Type is a value from 1 to 9
Sort is by default a text (ie. A001, B001, B002 aso.)
MYSQL Table: USER -> USERITEMS (1:N)
ITEM: UserID (->USER), ID (Int, AutoId), ITEMID (Int,->ITEMS),
After adding (manually at this step) you need to create a webpage (only functional, div fixed, no background aso.) with 2 lists:
Left list is a fixed list WEAR with 9 slots (free positions).
MYSQL Table: USER -> CHARITEMS
CHARITEMS: USERID (USER), TYPE (9 fixed items), ITEMID (Int, from USERITEMS)
Right list is a list of User ITEMS.
THE MAIN TASK:
The USER will drag from the right list to the left list, dropping only on the proper type slot(1-9). Not droppable on wrong Type!
Ajax request will be fired, then the left list will update without used items in right list, and right list will be filled with the new (dropped) item on the right place(1-9).
You will need to program in PHP, Javascript and MYSQL.
First you create the necessary MYSQL tables and Querys.
Then you create a PHP Script to first display the right list and the left list.
Then you create the Website with jquery or mootools to enable drag & drop.
Then you create a small javascript to update with ajax, after drag & drop with an event.
For Testing use a small set of icons or pictures not greater than 50×50 pixels. You can use any Images.
Delivery the Images, PHP script, MYSQL SQL Code and the .JS Javascript. I’ll be testing the source and then release the payment.
You will be using PHP5, MYSQL5, latest jquery or mootools.