Hi,
I use a form to upload image and I save the image in a directory.
But I would like to save with name like :
Image-1.jpg or Image-1.gif whatever type it is.
So my code is
PHP Code:
$count =1;
while(file_exists($uploadFilename = $uploadsDirectory.'Image-'.$count.'.what_to_do_here'))
{
$count++;
}
my file is in variable $_FILES[$fieldname].
I try $_FILES[$fieldname]['type'], but it does not work.
And another question.
I want to pass the variable in an another php file (success_upload_image.php) using header function.
header('Location: ' . $uploadSuccess?file='what...');
Thanks a lot for your help