Hi Michael,
In the tfu_upload.php I have entered the following code directly underneath the "//end of email section" (line 178). My code begins on line 180, ends on 201.
Code:
// Upload History section: This writes the details of an upload to a database table.
$cxn_joom = mysql_connect("[host]","[user]","[password]") or die ("No dice.");
$db_joom = mysql_select_db("[dbname]");
$dateupload = date("m/d/Y");
$filestr = "\n\n";
foreach ($_SESSION['TFU_LAST_UPLOADS'] as $filename) {
if ($upload_notification_use_full_path) {
$filestr = $filestr . tfu_urlencode(fixUrl(getRootUrl() . $path_fix . $filename)) . "\n";
} else {
$filestr = $filestr . str_replace('./', '', str_replace('../', '', $filename)) . "\n";
}
}
if ($filestr == "\n\n") {
$filestr .= 'Please check your setup. No files where uploaded.';
}
$username = (isset($_SESSION['TFU_USER'])) ? $_SESSION['TFU_USER'] : $_SERVER['REMOTE_ADDR']; // if we don't have a use we use the IP
$insertFields = "INSERT INTO jos_flashupload_historylog (uploadDate, uploadUser, file) VALUES (" . $dateUpload . "," . $username . "," . $filestr . ");";
$update_log = mysql_query($insertFields,$cxn_joom) or die ("Couldn't execute query.");
// end of Upload History section
Table info for jos_flashupload_historylog :
id int(10) UNSIGNED auto_increment
uploadDate varchar(30) utf8_general_ci
uploadUser varchar(45) utf8_general_ci
file varchar(255) utf8_general_ci
Naturally, I have replaced the bracketed items in the mysql connection function with my host info. I am using PHP 5 and MySQL 4.1. I am not yet a registered user, but I certainly will become one if I can get this script working (I will definitely need the upload size restriction lifted). Any ideas as to why this is not working? I greatly appreciate any insight you might have.
Thanks,
Frank