Rename image during upload

How to Rename image during upload

PHP Summer Training/Internship with 2 Live Projects in Noida Fee is only 5500/-Click here to Book Your Seat


How to Rename image during upload

Your file is uploaded with phptpoint name
your New file name
choose your file

In the above example
first enter your name whatever you want your new image name,
second you have to get the extension of image using $_FILES[‘file’][‘type’] it returns the array.

at the [0] index it shows image and at [1] index it shows your file extension like jpg, jpeg, png etc.

now you have to put these new name like $user.”.”.$extension at the 2nd parameter of move_uploaded_file( ) function.

Latest Trending Technologies