Ok Its getting late and i am getting tired. what stupid mistake am I making
here:
<?php
$filepath = $_REQUEST['filepath']; // this is the path to say music/preview
or /cd_covers
$ftp_server = 'ftp.XXXXX.co.uk';
$ftp_user_name = 'xxxxxxx';
$ftp_user_pass = 'xxxxxxxx';
$file = $_FILES['userfile']['name'];
$remote_file = $filepath.$file;
// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to
$ftp_server");
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass) or
die("login failed"); // logs the user or sets an error message
if(ftp_chdir($conn_id, $filepath)){
}else{
echo "Directory doesnot exist";
exit;
}
// upload a file\
if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}
ftp_close($conn_id);
?>
straight out of the manual what gives?
Cheers Richard