I am looking for a way to not only upload a file, but replace it if it has the same name.
Can this be done?

Once file has uploaded to your tmp directory, use move_uploaded_file() to place it where it goes. If the destination file already exists, it will be overwritten.

My 2ยข. Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.