Jump to content

Interactive Image Contacting Database


spanner1122

Recommended Posts

Hi all,

I am very new here and don't really have much of a clue what I am doing. My friend and I have undertaken an ambitious project, and are very stumped. We need an image that is hosted on a webpage that can be clicked by a user, and can link to other pages. The only issue is, we also need the image to access some sort of database. For example, a red light may come on if a value is "red" and a green light may come on if the value is anything else. We have basic HTML and CSS programming skills, but not much else. If it is important, we can also use Flash, but neither of us are sure how to use that to access the database. We really need help and any suggestions would be greatly appreciated.

Thanks,

spanner1122

Link to comment
https://forums.phpfreaks.com/topic/273377-interactive-image-contacting-database/
Share on other sites

Sorry if I was unclear. I want an imagemap style image that has clickable regions on it, linking it to other images or webpages. I can do this already with HTML or with flash, but I am unsure of how to access the database. What I actually want to do, is have 5 boxes that relate to the database. If a user clicks one, it changes the color of the box, and it is registered in the database. Then, if someone else opens the webpage, it will be as the other user left it. I am not even sure if this is possible, but any suggestions would be great, thanks!

Sounds like a job for Ajax. You use Javascript to send a request to your server when an image is clicked. Along with this request you send the id (or some data that identifies what image was clicked) of the image. You then need a php script which processes these requests, and saves the click into the database.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.