Hi ,Need some help please ?
trying to upload image with file upload to server,the code looks like this.....
-------------------------------------------------------------------------------------------------------------------------------
file.upload("upload.php?fln=" + _root._tempimageFileName[0])
-------------------------------------------------------------------------------------------------------------------------------
need some help writing the upload.php script to receive fln=" + _root._tempimageFileName[0]....
My upload.php looks like this .....
--------------------------------------------------------------------------------------------------------------------------------
<?php
// Variable (name) sent from Flash
$filename = $_FILES['Filedata']['name'];
// the uploaded file save as a temporary file on the web server
$filetmpname = $_FILES['Filedata']['tmp_name'];
/* You can return the File Type and File Size back to Flash if you like*/
//$fileType = $_FILES["Filedata"]["type"];
//$fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000);
// Path the file will be moved to
$destination_path = "images/";
// Path and file the file will be moved to
$destination_path = $destination_path . $filename;
// Call the move_uploaded_file function to move the file
// The move_uploaded_file function requires two parameters:
// - path of the temporary file
// - path where the file will be moved to
if ( move_uploaded_file($filetmpname, $destination_path) ) {
// move_uploaded_file returns true if the uploaded file was moved successfully,
echo "OK";
} else {
echo "FAIL";
}
?>
thanks in advance for any help!!