Hi Brad,
I send the files up with this code:
<form method="post" enctype="multipart/form-data" name="form1" id="form1"
action="upload_process.php">
<input name="ufile" type="file" id="ufile" size="75" /></td>
<input type="submit" name="Submit" value="Upload" />'.$error['ufile'].'</td>
</form>
upload_process.php looks like this
// I add a unique identifier to the file name, so that if a person uploads a file by the name of quotes.pdf one week and another, unrelated quotes.pdf the next week, they won't overwrite each other. We do that by opening up the last record
$this_uploadedFileName="ID" . mysql_insert_id() ."_";
$path= 'message_docs/'.$this_uploadedFileName.$HTTP_POST_FILES['ufile']['name'];
if($ufile !=none)
{
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))
{
echo "<div align='center' style='cellpadding: 4px; width:350px; height: 200px; margin: 0 auto 0 auto; background-color: yellow;'>";
echo "<font size='+1px'>File Transfer Was Successful</font><br />";
echo "<strong><p class =\"text_reg\">File Name :</strong>".$HTTP_POST_FILES['ufile']['name']."<BR/>";
echo "<strong><p class =\"text_reg\">File Re-Named :</strong>".$this_uploadedFileName.$HTTP_POST_FILES['ufile']['name']."<BR/>";
echo "<strong>File Size :</strong>".$HTTP_POST_FILES['ufile']['size']."<BR/>";
echo "<strong>File Type :</strong>".$HTTP_POST_FILES['ufile']['type']."<BR/>";
echo "<p><a href='../updateConversations.php'>Return to Previous Page</a></p>";
echo "</div>";
}
// else statement responds to user errors
I downloaded the excel file originally uploaded to the server and compared it to the local source. It opened up without a problem and contains the same data.