OnClick MySQL database update
This project is now closed with a project budget of N/A.Get free quotes for a project like this
Browse Related Skills
Other things people do on Freelancer
1, update the database similar to below:
INSERT INTO collection (user_id, item_id)
VALUES ($_SESSION[id], $_GET[id])
... where $_SESSION[id] is the ID of the logged on user, 1 indicates it is in their collection and $_GET[id] is the item that is being marked as part of the user's collection.
2. If the tickbox is already ticked and they wish to remove it from their collection it would instead do:
DELETE FROM collection WHERE user_id = $_SESSION[id] AND item_id = $_GET[id] LIMIT 1
3. The tickbox image should automatically update to ticked or unticked status according to whether it is in the user's collection after the onclick trigger.
IMPORTANT: This should be done without reloading the page (presumably by AJAX.)
Examples of similar functionality can be found at Amazon (you can add items to your wishlist in this way) or at www.icheckmovies.com.
Access to our web code will be made available to successful bidder via Plesk.
The rest of this page is already written - this is simply adding the above functionality. I will create a suitable MySQL table in advance.
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online