Jump to content

Recommended Posts

Hello, I'm working on my site and I ran into error's. :wtf:

 

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]

Link to comment
https://forums.phpfreaks.com/topic/184755-need-help-with-this-one-uploading-files/
Share on other sites

$_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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.