Dagon, I changed the "HTTP_POST_VARS" to "$POST" and "$FILES". They echoed nothing, so that probably indicated those variables are not carrying data over from the original form document.
It ran through the entire script, even echoing the "File Upload" which should indicate success. But, I checked the database and no files were entered.
So, I put those two echo statements at the very top of the page:
<?php
echo $_POST['strDesc'];
echo $_FILES['fileUpload'];
global $strDesc;
global $fileUpload;
global $fileUpload_name;
global $fileUpload_size;
global $fileUpload_type;
if(!(strlen($strDesc) && $fileUpload == "none"))
die("You must enter both a description and file");
It echos the following:
wee fileArrayYou must enter both a description and file
I had entered the brief description "wee file" and had chosen, via a "browse", a small .txt file. So, it echoed the "wee file" that I had entered, and I guess the text file echoes as an array. But, it is clear that this information is not getting assigned to the
global $strDesc;
global $fileUpload;
variables like it should.
What's the deal with these globals, and why aren't they picking up the data from the form file?
Thanks, all
Spivey