crouchjay Posted July 24, 2006 Share Posted July 24, 2006 On a portion of my site the user is able to crop the images to liking, but the cropped image stays when trying to recrop the same image, but when I press the refresh button the newly cropped image replaces the previous cropped image. How do I fix this? Jay.Thanks a lot for the help. Link to comment https://forums.phpfreaks.com/topic/15484-display-correct-picture/ Share on other sites More sharing options...
ChaosXero Posted July 24, 2006 Share Posted July 24, 2006 I have no idea because I cant give you a solution with no code... Post any signifigant code and then we'll try to help. I promise! (Comments in your code help too!) Link to comment https://forums.phpfreaks.com/topic/15484-display-correct-picture/#findComment-62801 Share on other sites More sharing options...
crouchjay Posted July 24, 2006 Author Share Posted July 24, 2006 The process works in such, that when the user decides to crop an image, it gets stored in tmp. The cropped image is displayed, where they have the choice of either NEW IMAGE, RECROP, SUBMITHere is the code for recrop selection[code]if ($_POST['recrop']) { unset($display); unset($image); //Path to image $imgfile=$_REQUEST['display']; //Image Name $image=$_REQUEST['imgfile']; //Delete cropped image unlink($imgfile);}//If Image name found get Original Imageif($image != "") $display="userImages/$username/largeVersion/".$image;//goto image crop html pageinclude_once( "HTML/createProfileImage.html" )[/code]So the original cropped image gets deleted from the file system, this has been proved, but after the second recrop of the image the original still displays until the refresh button is pushed.If there is any more code you want to see just let me know.ThanksJay Link to comment https://forums.phpfreaks.com/topic/15484-display-correct-picture/#findComment-62812 Share on other sites More sharing options...
ChaosXero Posted July 24, 2006 Share Posted July 24, 2006 You could force a refresh w/ a header(location: yoursite). Otherwise... I'm not sure. The image will stay until it is reloaded. You could use Jscript to refresh it (an AJAX type effect). Link to comment https://forums.phpfreaks.com/topic/15484-display-correct-picture/#findComment-62873 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.