I would recommend posting the coordinates of the crop to a php script, cropping in php, giving it a new name then setting the SRC attribute to the url of the new image.
Something like but needs tidying:
jcrop page:
<form id="crop_settings" action="saveimage.php" method="post" style="display:none">
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="h" name="h" />
</form>
<button id="save_picture">save image</button>
<script>
$('#cropbox').Jcrop({
onChange: updatePreview,
onSelect: updatePreview
});
function updatePreview(c){
$('#x').val(c.x);
$('#y').val(c.y);
$('#w').val(c.w);
$('#h').val(c.h);
};
$("#save_picture").click(function(){//some save button
$.ajax({
type: "POST",
url: "saveimage.php",
data: $("#crop_settings").serialize(),
success: function(data){
$(#the_display_image).attr("src","new.jpg")
}
});
});
</script>
saveimage.php
if(isset($_POST['x'])&&isset($_POST['y'])&&isset($_POST['w'])&&isset($_POST['h'])){
$targ_w = 300;
$targ_h = 500;
$src = 'original.jpg';
$img_r = imagecreatefromjpeg($src);
$dst_r = ImageCreateTrueColor($targ_w,$targ_h);
imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],$targ_w,$targ_h,$_POST['w'],$_POST['h']);
imagejpeg($dst_r,'new.jpg',90);
}