I have tried to use the filename but it's still not working.

here is the whole code I've got:

****** First file called 'upload.php'
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" ENCTYPE="multipart/form-data"
action="uploadfile.php">
 <table width="50%" border="0" cellspacing="0" cellpadding="1">
  <tr>
   <td width="21%">File</td>
   <td width="79%">
    <input type="FILE" name="file">
   </td>
  </tr>
  <tr>
   <td width="21%">
    <input type="submit" name="Submit" value="Submit">
   </td>
   <td width="79%">&nbsp;</td>
  </tr>
 </table>
</form>
</body>
</html>

******second file called 'uploadfile.php'
<?php
if($file)
 {
 echo "file name :",$file_name,"<P>\n";
 copy($file,"D:/graphic_practise/$file_name");

 print("file uploaded");
 }
?>

thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to