rendered paste body<?php if ($_POST["uf"] == 1){ $nombre_archivo = $_FILES['archivo']['name']; if (move_uploaded_file($_FILES['archivo']['tmp_name'], $nombre_archivo)){ echo "El archivo ha sido cargado correctamente."; }else{ echo "Ocurrió algún error al subir el fichero. No pudo guardarse."; }}?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Documento sin título</title></head><body> <form action="index.php" enctype="multipart/form-data" method="post" > <input type="file" name="archivo"/> <input type="submit" value="Subir archivo" /> <input type="hidden" name="uf" value="1" /> </form></body></html>