Hi Forum,
I have a field called "vehicle_pic", set to longtext in my DB Table.
I've set my project to upload images. I'm able to upload .jpg and .gif files successfully.
Here's the problem
If I try to upload a file with extention .txt or .exe (anything other than .jpg or .gif) it produces an error page as follows:
PHP error happened
Error type 2
Error description: imagecreatefromstring() [function.imagecreatefromstring]: Empty string or invalid image
etc.
I would like to be able to display an error message such as "Sorry you have chosen the wrong file type" should the user tries to upload anything other than a .jpg or .gif file.
I need this to occur when the user is adding a record. I do not want the user to get the above error page as this gives the impressions that the application has failed.
Thank you in advance.
Lisa