@SamKookauthorApr 02.2004 — #I did find something about $_FILES['userfile']['name'], but i jsut don't understant it. is userfile and name are var names or it's supposed to be my vars in the code?
Here is my code, the part in bold is where the filename is supposed to be. <i> </i>//Uploadage de l'image sur le serveur $newfile = $myrow["NomTable"] . [B]"Filename_Here"[/B]; if(copy($_POST["Image"], $newfile)) { print("<h3> UPLOAD SUCCESSFUL!</h3>"); } else { print("<h3>ERROR UPLOADING FILE!</h3>"); }
mysql_query($QueryInsert,$db);
printf ("<form name="Photos" method="post" action="%s?ListeSection=%s&Submit=False">",$_SERVER['PHP_SELF'],$_GET["ListeSection"]); echo "<p></p>"; echo "<p align="center">L'image a été enregistré avec succès.<br /><br />"; echo "<input type="Submit" name="Submit" value="Retour"></p>"; echo "</form>"; } else
@Khalid_AliApr 03.2004 — #[i]Originally posted by SamKook [/i]
[B]I did find something about $_FILES['userfile']['name'], but i jsut don't understant it. is userfile and name are var names or it's supposed to be my vars in the code?
[/code] [/B][/QUOTE]
here is a bit more detail.
suppose you have an html file element
<input type="file" name="file"/>
now in the file array the first index value will be the the element name which in this case is "file"