how to allow uploading two different extension files?
I've used the following code to check if the extension is not GIF nor JPG
Code: Select all
if ($_FILES['picuploaded']['type'] !="image/gif" or $_FILES['picuploaded']['type'] !="image/jpg") {
$ok=0;
}Code: Select all
if ($_FILES['picuploaded']['type'] !="image/gif") {And second question, I want to change the file name once it is uploaded, Lets say to: $serial_number.jpg or $serial_number.gif (the extension stays the same as the original).
Does anyone know?