OK, so maybe the file upload code was placed below the database insert or update code, so that it hasn't been uploaded at the time of the database update and then you redirect and the upload code never runs... that seems possible based on your description.