Merry Christmas everybody. I am using MS Windows 98 with Apache and following an example in Julie Meloni's "PHP - Fast and Easy" (Chapter 10) in which she describes file uploading using PHP on page 168-174.
She has two files: 1) an html form to receive the input from the user for the file to be uploaded 2) a .php script to accept the variable and use the copy() function. ............................................................. The scripts are as follows: (html form) <HTML> <HEAD> <TITLE>Upload a File</TITLE> </HEAD> <BODY> <H1>Upload a File</H1> <FORM METHOD="post" ACTION="do_upload.php" ENCTYPE="multipart/form-data"> <p><strong>File to Upload:</strong><br> <INPUT TYPE="file" NAME="img1" SIZE="30"></p> <P><INPUT TYPE="submit" NAME="submit" VALUE="Upload File"></p> </FORM> </BODY> </HTML> ................................................ (.php script) <? if ($img1_name != "") { @copy("$img1", "c:/Program Files/Apache Group/Apache/htdocs/$img1_name") or die("Couldn't copy the file."); } else { die("No input file specified"); } ?> <HTML> <HEAD> <TITLE>Successful File Upload</TITLE> </HEAD> <BODY> <H1>Success!</H1> <P>You sent: <? echo "$img1_name"; ?>, a <? echo "$img1_size"; ?> byte file with a mime type of <? echo "$img1_type"; ?>.</P> </BODY> </HTML> ...................................................... My questions: I am able to upload a file from My Documents to the Apache server however in her book, she describes that the user can verify that the file was uploaded to the server by going to: File/ Open Page / in ones web browser to navigate through their filesystem to find the file that was uploaded. There is a screenshot in the book that shows the .jpeg file on the screen with the browser at: file:///C/Apache/htdocs/blahblah.jpg I can't seem to verify that the file exists using this method. The only way I can verify that the file was indeed uploaded is to go into the folder within Apache that was specified in the path and check there. *How can I check by going through the browser window?* Next question: When I check that the file was uploaded, the file is saved in: C:/Program Files/Apache Group/Apache/htdocs/$img1_name as the *regular *.jpeg name I originally gave it - not the variable - $img1. Is this correct? Or, should the file be saved as: img1? And the last question: This is the line I received upon sending the file: You sent: KewpieSmall.jpeg, a 3127 byte file with a mime type of image/pjpeg. In her book, it says: image/jpeg. What is: image/pjpeg.? Many thanks and best wishes to all for a happy and healthy new year. Tony Ritter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]