1

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.

ax.falcon
  • 43
  • 1
  • 10
  • Im not sure how to fix the question from a mobile as the formatting seemed incorrect for the posting platform. Please feel free to correct. – ax.falcon May 10 '18 at 00:30
  • Can we see your JavaScript code? – Jonathan Rys May 10 '18 at 00:41
  • Currently it is the same as on the page link I provided above. I couldn't get that code to work either; as is stated in some of the comments of that link the code didn't work properly. – ax.falcon May 10 '18 at 01:13

0 Answers0