Upload un fichier

Fermé
hwm86 Messages postés 23 Date d'inscription mercredi 23 septembre 2009 Statut Membre Dernière intervention 27 mars 2012 - 11 nov. 2009 à 09:12
Bonjour,
j'ai téléchargé ce code pour upload un fichier mais je ne comprend pas comment ça marche?
SVP vous avez m'aider?
ce code est:




<script language='javascript'>
function filegetname(){var name=document.getnamefile.file.value;
location.href="?namefile="+name;
}
</script>
<div align="left">Sélectionner ce fichier image:<br />
<form enctype="multipart/form-data" action="" method="post">
<input name="file"type="file"size="100" /><input type="submit"value="Go"onclick="filegetname();return false;" /></div>
<? if (!empty($_GET['namefile'])){echo 'Le nom sélectionné : '.$_GET['namefile'];} ?>
</form>