Rename Image while uploading using phpinfo in PHP Move uploaded File Function











>> YOUR LINK HERE: ___ http://youtube.com/watch?v=l8E2xd7dQmI

This PHP Tutorial explains how to rename a file while uploading and insert the same name in database in php. • Steps: • Create a form for file upload • Create a db file • rename file • move to folder • insert into database • Before renaming , get the extension of the image. For that I have used phpinfo with option extension. As that will return the extension of the file uploaded. • Phpinfo has 4 elements - directory name, basename, extension and filename. • if option is not defined, it will return array, else it will return string. • For rename, I have passed string and current date combined with randomno so that no two image will have same name. • After rename, move to folder with move_uploaded_file function in which file temporary name and directory name will be passed. • If uploaded in folder, then insert that into database table. • • If you are downloading code, Create a folder upload in your project folder • Code link • https://github.com/sushma-singh-yadav... • • #php #knowledgethrusters

#############################









Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org