This is an example of why a software project doesn't deserve to be called a project until it's under source control. With every previous version of the code on file, you'd be able to tell what has changed since you last knew it was working.
Do you get redirected to [font=monospace]77083368[/font] or [font=monospace]37767[/font]?
Have you tried checking to see if the statement's execution failed (so that [font=monospace]STM->execute()[/font] returned false) and examining its [font=monospace]errorInfo[/font] property to see if that provides any further information?
I notice a few errors in control flow: using the value of [font=monospace]$FILES['file']['name'][/font] before verifying that[font=monospace]$FILES['file'][/font] exists, connecting to the database, emptying the table, and preparing the insert statement before checking to see if the CSV file could be opened, only closing the database connection if the file is opened.