Hi, if i use the code below is there any way in which i could change the file name as it is being uploaded, to a random number.
$path = "C:/wwwroot/pp/images/pp";
$url_images = "http://javelin.dns2go.com/pp/images";
$max_size = 1000000;
//Upload Thumbnail
if (is_uploaded_file($thumbnail)) {
if ($thumbnail_size>$max_size) { echo "The file is too big<br>\n"; exit; }
if (($thumbnail_type=="image/gif") || ($thumbnail_type=="image/pjpeg")) {
if (file_exists($path . $thumbnail_name)) { echo "The file already exists<br>\n"; exit; }
$res = copy($thumbnail, $path . $thumbnail_name);
if (!$res) {
echo "upload failed!<br>\n"; exit; }
else
echo "upload sucessful<br>\n";
echo "File Name: $thumbnail_name<br>\n";
echo "File Size: $thumbnail_size bytes<br>\n";
echo "File Type: $thumbnail_type<br>\n";
} else { echo "Wrong file type<br>\n"; exit; }
}