// Remove the record from the database.
$query = "DELETE FROM uploads WHERE upload_id = $upload_id";
$result = mysql_query ($query);

// Add more detailed error reporting, if desired.

}

} else { // If the query did not run OK.
echo '<p><font color="red">Your submission could not be processed
due to a system error. We apologize for any
inconvenience.</font></p>';
// Print the query and invoke the mysql_error() function to debug.
}

} else { // File doesn't exist.
$page_title = 'File Download';
include ('include/header.html');
echo '<p><font color="red">The file could not be located on the server.
We apologize for any inconvenience.</font></p>';
include ('include/footer.html');
}

No...the slash is supposed to be there (I assume). You're PUTTING the file somewhere ("uploads/uid") and then LOOKING for it somewhere else ("uploadsuid").

This is very basic debugging. If the upload works, leave it. Finding the file doesn't work. Why? Problem 1: you were using single quotes. Fix it. Still broken? Why else? Oh, the path isn't right. Fix it. Still broken? Go look at other things.

That's what I've been doing

I've tried everything I can think of permissions to full path
and if I use phpmyadmin to test the sql it works, in my opinion it has something to do with the $uid , but what I don't know.
That's why I gave up and came here hoping it would be something starring me in the face but couldn't see.