Can I Use A Form Field To Rename An Upload Image File?

     

I have an 'Upload-File' field in my form for my site visitors to upload images.


  

Currently the file is saved to my server with the same 'name' it was uploaded with.


I would like to add an input field to my form (like the one below) so the user may enter a new 'name' for the [image] file.


  

I need some advice on altering the current php code to rename file before it saves to my server.


Here is the current php code for image handling:


500000)  {   echo "× FILE IS TOO LARGE"; $uploadOk = 0;  }  if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" )  {   echo "× ONLY JPG