toddjr wrote:okay basically i have a photo album written in php....now i have multiple images per page then i have a high res option when you click the thumbnail and a screen pops (by the way i just started this in the middle of it being done so i will explain the best i can)now i have a database storing the images and there is a next button and previous....though i call the variables and store them into a template array so that they can be called from .tpl file so basically i am trying to create a form button of sort to i guess like you said to request another script rotate the send back the rotated image them refresh to show the new image of the one i was currently on...
i hope that helps alitttle i know i am trying to get the hang of all this and its hard cuz i diddnt start on it im thrown into it.....thank you for helping me out
Well, here's one way to do it.
I would have an html form that would post the id of the image I wanted to rotate, and optionally the angle at which to rotate if you support a variable angle. Since php recognizes posted form data as the $_POST array, you can test for the presence of a post variable and valid data and call a function that performs your rotate functionality on the same page that the images are displayed on (if the variable isn't present, it will skip this step and simply display the array of images). And since there's a decent amount of code that goes into the rotation process, I would definitely recommend NOT writing the function as inline code (either in a class or a module).