I know your all getting sick of my FTP questions. . . I'm sick of askin' 'em. But my script isn't working. . . It creates the file, but puts no information in it (file size is always 0 bytes). Any help would be great.
Code:if ($_POST['Submit'] == 'Submit'){
$conn_id = ftp_connect("localhost") or die("Couldn't connect");
$login_result = ftp_login($conn_id, "????", "??????") or die("ERROR IN FTP CONNECTION");
@ftp_mkdir($conn_id, './Information/Uploads/');
$path2 = './Uploads/';
$path = './Information/Uploads/';
$o_name = basename($_FILES['uploadedfile']['name']);
$path .= $o_name;
$path2 .= $o_name;
$temp = tmpfile();
if(ftp_fput($conn_id, $path, $temp, FTP_ASCII)){
print '<h1>File "'.$o_name.'" has been uploaded.</h1><h2>We thank you for your donation to this website, and look forward to seeing it accessed by our users.</h2>';
$path_parts = pathinfo($path);
$title = $_POST['title'];
$filetype = $path_parts['extension'];
$style = $_POST['style'];
$disc = $_POST['discription'];
$sugrank = $_POST['suggestedrank'];
$provider = $_SESSION['username'];
$notes = $_POST['notes'];
$copyright = $_POST['copyright'];
MySQL_Query("INSERT INTO files VALUES(
NULL,
'$path2',
'$title',
'$filetype',
'$style',
'$disc',
'$sugrank',
'$provider',
'$notes',
'$copyright'
)");
} else {
print "Error Uploading File:<br>$o_name";
}
MySQL_Close($Connection);
ftp_close($conn_id);
}

