HOla man weno discupa pero estaba buscando esto y mira edte el codigo para ser un solo archivo mira aka
Código PHP:
<form enctype="multipart/form-data" action="<?=$PHP_SELF?>?action=upload" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
<?php
// Where the file is going to be placed
$target_path = "uploads/";
/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
"El Archivo Se ha Subido Correctamente!";
} else{
echo "Error En Subir El Archivo Intenta de Nuevo!";
}
?>