Page 1 of 1

uploading to ftp in php

Posted: Thu Oct 26, 2006 9:15 am
by sh33p1985
im developing a website and have written a administration area for the owner to manage and oversee her website. one of the primary functions here is the ability to add/edit/remove prodcuts from the database. i wanted to associate each product with an image when that product was initially added to the database; hence you specify the image which is stored locally on your HD, and upload that image to lets say "/Product Images" on the websites server. there is a field in the products table which holds the URL of the products image so it can be easily shown.

however im having little sucess with using the ftp functions to atually upload anything.

any help would be much appreciated.

Posted: Thu Oct 26, 2006 12:59 pm
by feyd
Care to post your existing code?

Posted: Fri Oct 27, 2006 4:55 am
by sh33p1985
its ok, solved the problem using the $_FILES array and move_uploaded_file() instead of the ftp functions.