<?php
/*
Script Written By: Adam Khoury @
www.developphp.com
*/
// Set local PHP vars from the POST vars sent from flash
$todayDate = $_POST['todayDate'];
$Oldname = $_POST['Oldname'];
$Path = $_POST['Path'];
$filename = $_FILES['Filedata']['name'];
$filetmpname = $_FILES['Filedata']['tmp_name'];
$fileType = $_FILES["Filedata"]["type"];
$fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000);
if (unlink($Path.$Oldname))
{
// Place file on server, into the images folder
move_uploaded_file($_FILES['Filedata']['tmp_name'], $Path.$filename);
}else//elseif($Oldname == "")
{
move_uploaded_file($_FILES['Filedata']['tmp_name'], $Path.$filename);
}
?>