Yes i have this line in my first "upload" case of the switch:
$file_name = $USER . "-".rand(1, 888).".jpg";
Then in my switch case "crop" (that takes care of the image you crop), I wish to replace the uploaded one with the new one, simply by uploading with same name. Now i cant use $file_name in the case "crop" so how can I do this?