Hello I have a form in a webpage where iw ant to be able to upload files to the place where i keep my files.
first i have an html file looking like this
<form name="form1" method="post" action="upload.php" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" name="submit" value="submit">
</form>
then i have the php+page looking like this:
if($submit){
copy($file,"$file_name");
echo "<H1>uploaded: $file_name"</H1>;
}
I cannot understand what is wrong! I suspect it is something with the copy function but i took it from a book so...
please help me!