I have a gallery program that has an image viewer. The image viewer displays images with individually counted ID's to identify each image individually for later processing. So when displaying these images with individual id's my code looks like this:
echo '<div id="'. $individual_id .'" class="viewer">
<img src="'.$img_src.'" class="viewer_img"/>
</div>';
I read the following: Rotate image with javascript
But couldn't get it to work with the individual tags.
I want to be able to rotate an image 90,180 and 270 degrees in JavaScript and as that rotation is applied I need to upload the correct rotation degree into a mysql database.
I don't need the mysql statement but just the JavaScript code to rotate and the ajax code to update the database.
Thanks in advance.