Rizla Posted December 11, 2009 Share Posted December 11, 2009 Hello, I'm working on my site and I ran into error's. The page I'm having troubles with serves to add templates to my site. But when the submit btn gets hit it does absolutely nothing. It does not add the data to the database, it does not upload the 3 files. This page is far from finished, right now i want to get the add case to work. I have attached 4 files, 3 of them are screenshots and the 4th one is the php file itself. I've been trying this and that for the few last hours and sadly enough without any result. I do think it has something to do with the if part that checks what file type the 3 upload files are. Because it scips to the esle part that echo's a message. Hope someone spots the problem! Greets Rizl4 [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/184755-need-help-with-this-one-uploading-files/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 11, 2009 Share Posted December 11, 2009 $_FILES['template_readme']['type'] does not contain one of your expected values. I recommend echoing $_FILES['template_readme']['type'] as part of your error message so that you know exactly what it is. Your code is also not checking the ['error'] element before it attempts to check any of the other pieces of data concerning the uploaded file(s) so it is entirely possible that $_FILES['template_readme']['type'] is empty because the file was not actually uploaded without error to your server. See this thread for more complete error checking ideas - http://www.phpfreaks.com/forums/index.php/topic,278952.msg1320835.html#msg1320835 Quote Link to comment https://forums.phpfreaks.com/topic/184755-need-help-with-this-one-uploading-files/#findComment-975398 Share on other sites More sharing options...
Rizla Posted December 11, 2009 Author Share Posted December 11, 2009 thank you PFMaBiSmAd, I tried what u said and I came to the conclusion that some file types where misplaced or incorrect. Everything works now and I'm left with some minor fine tunement work. Thanks!!! Quote Link to comment https://forums.phpfreaks.com/topic/184755-need-help-with-this-one-uploading-files/#findComment-975454 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.