graham23s Posted November 3, 2007 Share Posted November 3, 2007 Hi Guys, I am making an upload form for users to upload they're pictures (single upload) i was curious as to what a lot of other members do in terms of logic i'e whats the first thing you check for once the form is submitted? is it the mime type,extension,size and in what order i know there is a lot of different ways to do it, but wasn't sure if there was a certain procedure or order to do them in? any advice would be greatthanks guys Graham Quote Link to comment https://forums.phpfreaks.com/topic/75889-file-uploading-question/ Share on other sites More sharing options...
Daniel0 Posted November 3, 2007 Share Posted November 3, 2007 If it's an image, then getimagesize() will return a value. If it doesn't then it isn't an image. You can check it in that way. You can check the mime type with image_type_to_mime_type(exit_imagetype($filename));. Quote Link to comment https://forums.phpfreaks.com/topic/75889-file-uploading-question/#findComment-384089 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.