spanner1122 Posted January 20, 2013 Share Posted January 20, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/273377-interactive-image-contacting-database/ Share on other sites More sharing options...
trq Posted January 20, 2013 Share Posted January 20, 2013 Its pretty unclear what your asking. You want to display a different image based on data from a database? Quote Link to comment https://forums.phpfreaks.com/topic/273377-interactive-image-contacting-database/#findComment-1407033 Share on other sites More sharing options...
spanner1122 Posted January 20, 2013 Author Share Posted January 20, 2013 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! Quote Link to comment https://forums.phpfreaks.com/topic/273377-interactive-image-contacting-database/#findComment-1407034 Share on other sites More sharing options...
trq Posted January 20, 2013 Share Posted January 20, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/273377-interactive-image-contacting-database/#findComment-1407035 Share on other sites More sharing options...
spanner1122 Posted January 20, 2013 Author Share Posted January 20, 2013 OK, I am not really sure how to do any of this, but I will look into it. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/273377-interactive-image-contacting-database/#findComment-1407036 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.