Silence~ Posted August 5, 2015 Author Share Posted August 5, 2015 (edited) Okay, I found out the solution to that error.. I utterly embarrassed myself for not looking through thoroughly >< With the help of this post : http://w3schools.invisionzone.com/index.php?showtopic=47997&p=265892 , I realised I had moved my coding to the starting of html form and that what caused the error since the header location must be located before the html tag. Thanking Ingolme indirectly (Thanks a bunch ) . Anyways, I still can't validate if the file is not image. It won't show the $errors[] either. >< I'm not sure where i go wrong o,o Edited August 5, 2015 by Silence~ Link to comment Share on other sites More sharing options...
justsomeguy Posted August 5, 2015 Share Posted August 5, 2015 If this line isn't working: if ((!in_array($mimetype, $allowedTypes)) || (!in_array($extension, $allowedExtensions))) {Then print out what you're checking for:echo 'MIME type: ' . $mimetype . ', extension: ' . $extension';If something like that isn't working like you expect the first thing to do is verify everything. Link to comment Share on other sites More sharing options...
Silence~ Posted August 6, 2015 Author Share Posted August 6, 2015 My apologies. It actually does show the errors, just that it was hiding under my navigation bar. I sorted it out already. Thank you for all the help I need ^^ [is there any way I can mark this as answered?] Link to comment Share on other sites More sharing options...
dsonesuk Posted August 6, 2015 Share Posted August 6, 2015 [is there any way I can mark this as answered?] Usually by adding [solved] to topic title Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now