Jump to content

Recommended Posts

Hello!

I'm kinda new here so I thought I'd rather post in the newbies forum! ;)

Anyway, I'm currently implementing a basic CMS for my website so it is based on a MySQL database. This is all up and working so far but now I'm stuck at implementing a simple file upload.

While I got a basic file upload to work in a seperate test-file (simple file form and then move_uploaded_file() ) so everything is working on server and the basic code I cannot get it to work if the file upload is to be implemented in my more complex CMS-form.

Not to get lost I have spread different capabilities and steps of the code in seperate files and I get the impression it has something to do with that, but I'm not sure. Basically one file contains the html code of the page and includes another file which contains the code for the CMS-form which allows one to create a page entry with a number of fields - among them a file upload which should enable one to have each entry accompanied by an image/other file - upon submitting the data everything gets sent to a third file which handles the communication with the server (e.g. loading everything into the SQL database) and supposedly also loading a file into a certain folder of the webserver.

As said, basic file upload works for the destination, but not when used in the more complex construct above. As I have so far not managed to break the problem down to a certain area (removing unnecessary code and rearranging the upload-code has not managed to make it work) I'm at a loss.


If anyone has any ideas in what kind of problem I might have stepped into I'd be glad for any hints!
Link to comment
https://forums.phpfreaks.com/topic/5200-file-upload-in-a-cms/
Share on other sites

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.