View Full Version : Upload feedback

11-05-2006, 10:58 PM
Hello, I'm making a simple upload form and I was just wondering how to say, "The file name is _______" and then post the name of the file that was used in the form.... is that possible with my code??


$file_path = $_FILES['fild']['tmp_name'];
$file_name = $_FILES['fild']['name'];
$file_size = $_FILES['fild']['size'];
$file_type = $_FILES['fild']['type'];
$file_error = $_FILES['fild']['error'];

copy($file_path, $file_name) or die('There was an error while uploading your file. Please try again.');
echo('Your file has been uploaded.<br>Thank you!');

<form method="post" enctype="multipart/form-data">
<input TYPE="file" name="fild">
<input name="submit" type="submit" value="Upload" />

11-05-2006, 11:12 PM
Try this...

echo "The file name is ".$_FILES['fild']['name'];


11-05-2006, 11:39 PM
Thank You, I knew it was something simple like that I just couldnt remember

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum