Hello all. I basically need this to take my uploaded file via form, and put it into another directory. I know I should use move_uploaded_file, but a client wants it this way.
I dont get any errors using this code other than the built in "FTP Error". Could anyone tell me why? Note: It isnt really an image being uploaded.
$file_sent = $_FILES['image']['tmp_name'];
if(ftp_put($conn_id, $file_sent, $destination.$_FILES['image']['name'], FTP_ASCII)){
if(mail($to, $subject, $message, $from)){
echo 'Success.';
} else {//could not send email
echo 'Could not send e-mail.';
}
} else {
echo 'FTP Error';
}