Forum Moderators: coopster

Message Too Old, No Replies

PHP Overwriting files.

Allowing users to overwrite a file of choice?

         

inveni0

5:22 pm on Dec 1, 2005 (gmt 0)

10+ Year Member



I have an html form that allows users to upload images to the server. The images uploaded are supposed to replace the current images on the server (i.e. renaming the new and overwriting the old file). This works fine; however, instead of hardcoding the file name into the PHP file, I'd like for the user to select the file they want to overwrite by selection the appropriate radio button.

How do I get PHP to use the value of the radio button selected as the filename?

inveni0

7:10 pm on Dec 1, 2005 (gmt 0)

10+ Year Member



I've solved this. Thank you.

coopster

7:49 pm on Dec 1, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Nice job. For future reference, this PHP manual page regarding PHP and HTML [php.net] is a good read.