Downloads and Uploads

How to handle image uploads and downloads with php?

A form for user to upload picture into the database. The database should save the image in a folder and the path in the database. So when retrieving the image, it will refer to the path where the image was saved in the database.

Public Comments

  1. You could search for a script on Google, but if you want to make it by yourself you'd need - - A user registration, login/logout and upload script - An admin control panel so you can delete (troublesome) users - An upload form - An upload process - A retrieving form - A retrieving process Good luck! that will keep you busy for a while!
  2. You basically need to use thel "file upload" capability that exists in browsers and in the php environment. This will allow users to upload any file in such a way that your php code can then do whatever it wants with the file on the server side. See http://www.php.net/manual/en/features.file-upload.php for details. As far as inserting the path in a database, you'll have to write php and sql code to do that; exactly how you do this depends on what type of database you have (e.g. mysql, sybase, oracle)
Powered by Yahoo! Answers