Jump to content

PHP File Upload - How Does it Work?


MarkT

Recommended Posts

Hello,

Can anyone show me a demo of a code, I'm looking for a form that uses text and file upload.

I need a form that has details such as title and content, but I also want an image upload where it saves the file to my FTP server in a folder called Uploads and then it saves the filename and extension to the database, along with the other details from the form.

 

Can anyone give me the code and explain it please!

 

Thanks in advance.

Link to comment
Share on other sites

The "Saving the Uploaded File" example shows how to save the file. You use the move_uploaded_file function to save it where you want. As for the other fields in the form, those are just normal form fields that will have their values submitted via $_POST.

 

http://www.php.net/manual/en/function.move-uploaded-file.php

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...