Hi, i would like to change the name of the image tt is uploaded. how do i go about doing that? here is my uploading code:
<?php
$target_path = "Upload//";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(!ereg("image",$_FILES['uploadedfile']['type']))
{
echo "<b>File is not an image";
}
else if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))
{
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else
{
echo "The file size is too big";
//print_r($_FILES); //debugging info
}
?>