mysql and file upload problems
| From: | Carl E Shmidt | Date: | Sat, 09 Mar 2002 15:21:21 +0000 |
| Subject: | mysql and file upload problems | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17590@lists.php.net to get a copy of this message | ||
I have a standard multipart/enc form to allow users to upload files.
Pseudocode:
//call function to insert file details into the database
if( NOT file upload attack, wrong file type, etc.){
//copy the file to the permanaent location
}
else{
//delete the record of file details from the database
}
I can have the file upload successfully, and the record is inserted into the
database. The problem is that if there are errors on file upload, then the
record is never deleted from the database. The file upload is resubmitting
to the same page, and no redirection takes place. WHat's going on?
Carl