How can I 'rename' a file that php is uploading by inserting the 'label' (from the form) 'name'?
ex: uploaded file original name = wedding1.jpg
name label = jane doe
renamed uploaded file saved to server would = wedding1janedoe.jpg
What code would I have to put in to the php script?
Any help, thank you!
L
how to add variable to filename
Moderator: General Moderators
Re: how to add variable to filename
strip the extension (strrpos() might help there), add what you want, then tack the extension back on.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.