I'm having some trouble attempting to use some combination of Javascript and forms to submit queries to my SQL database. My goal is to have a list of ten images that cycle through three possible options, which I'm able to do with Javascript using something like
<img src="image.jpg" onclick="this.src=getNextPic();" alt=""/>. My problem is figuring out how to assign a hidden form value based on which state the image is in when submit is clicked. Any suggestions would be appreciated, thanks.