There is already a file on the server with the name <?php echo $_FILES['pic']['name']; ?>. Please rename your file and try again. <div style="float: right;"> <a title "Click here to view a list of files on the server for reference" href="images.php">List of files on server</a> </div> <?php exit(); }
An error has occurred with the upload of the file <b><?php echo $_FILES['pic']['name']; ?></b>. Please try again. <?php }
?>
</body> </html> [/code]
I've bolded the most important part I think (the part where the php code actually takes the picture from the user's PC and uploads it to the server). Everything else is error catching and a little formatting, as well as adding text to a textarea in another window (that's there because in my project I have a new pop-up with this code appear for the upload and then after the image is placed on the server I insert code into the textarea of the previous window).
I haven't checked this code in a while, but I remember it working the last time I used it. Let me know if it works out for you.
Douglas
PS Okay, so the bold tags don't work within the php tags. So here is the excerpt I was talking about.