Actually i want change the filename after i have insert the DB ,i tried but while inserting the value that time i changed but while moving the file is i can't change file name,
I want to change the filename afeter i want move to one folder,inserting that value in DB
if (isset($_FILES['file'])) {
move_uploaded_file(
$_FILES['file']['tmp_name'],
"upload/" . $_FILES['file']['name']
);
// here i got original filename,but i wnt change the filename
$filename = $_FILES['file']['name'];
$extension = pathinfo($filename, PATHINFO_EXTENSION);
// so here i changed filename but inserting in this file name and while in originalfilename,how to change that original filename
$original_file = md5($filename) . time() . rand(10, 1000) . '-' .$extension;
$sql = mysql_query("INSERT INTO useralbum(photo) VALUES('$original_file')");
if ($sql) {
echo "SUCCESS";
} else {
echo "ERROR".mysql_error();
}
}