Hi, just to let you know i've sussed it out, i didnt realise that the destination directory had to be on the system, rather than on the site
thank you very much for ur help and time adnan Adnan wrote: > Hi, > > i have been having trouble working out how to upload an image, the most > progress ive made is putting a blank file on the server, but thats it, any > suggestions anyone?? > > Im using PHP 4.3.2, Apache 1.3.27 > > here is the code im using! > > photoposted.php > > <? > > $ftp_user_name='username'; > $ftp_user_pass='********'; > $ftp_server='xxx.xxx.xxx.xxx'; > $ftp_dir='/'.$_FILES['imagefile']; > $destination_file=$ftp_dir.''; > > $conn_id = ftp_connect($ftp_server); > $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); > $upload = > ftp_put($conn_id,$destination_file,$_FILES['imagefile']['name'],FTP_IMAGE); > > ?> > > postphoto.php > > <? > > echo "<form action=\"/en/index.php?action=members&mp=photoposted\" > method=\"post\" enctype=\"multipart/form-data\">"; > echo "Click the Browse button to find the file you wish to upload"; > echo "<input type=hidden name=\"MAX_FILE_SIZE\" value=200000>"; > echo "<input type=\"file\" name=\"imagefile\">"; > echo "<INPUT TYPE=\"submit\" name=\"upload\" value=\"upload\">"; > echo "</form>"; > > ?> > > i am quite new to php, any suggestions would be highly appreciated! > > thanks :) > > adnan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php