I\'m using PHP to upload an image from a form to the server and want to rename the image lastname_firstname.[original extension]. I currently have:
move_upl
Dont forget if you are allowing people to upload arbitrary files, without checking the, extension, they can perfectly well upload a .php file and execute code on your server ;)
The .htaccess rules to deny php execution inside a certain folder is something like this (tailor for your setup)..
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI
Put this into a .htaccess file into the folder where you are uploading files.
Otherwise, just bear in mind that files may have more than one "." in them, and you should be golden.