Only getting base file name, not full file path in file upload form
I cannot seem to get the full file path in the following html code that I need for my php script to ftp a video file. I show the method of retrieving the file info in php first. My ftp_nb_fput is not working because it cannot find the file as it assumes it is on the server, not the local machine. I am using this so that I can see the progress of the upload without too much code:
ANY HELP WOULD BE GREATLY APPRECIATED !
<?php
$source_file = isset($_POST['filen']) ? ($_POST['filen']):($_SESSION['filen']);
'
'
$fp = fopen($source_file, 'r');
$ret = ftp_nb_fput($conn_id, $destination_file, $fp, FTP_BINARY);
while ($ret == FTP_MOREDATA)
{
$uploaded = 100 * ftell($fh) / $file_size;
print "$uploaded % complete \n";
// Continue upload...
$ret = ftp_nb_continue($conn_id);
}
if ($ret != FTP_FINISHED)
{ include 'upload_video_failed.htm';
exit(1);}
else {include 'upload_video_db.php';}
fclose($fp);
'
'
?>
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="./upload_video.php">
<TABLE>
<TR>
<TD> Video<span class="style1"> *</span></TD>
<TD><INPUT NAME="filen" id="filen" TYPE="file" size="30" class="fields"></TD>
</TR>
<TR>
<TD> Title<span class="style1"> *</span></TD>
<TD><INPUT NAME="title" id="title" TYPE="text" size="43" class="fields"></TD>
</TR>
<TR>
<TD> Category<span class="style1"> *</span></TD>
<TD><select name="category" id="category" class="h1">
<option selected>Select the category that best describes your video</option>
<option>Documentary</option>
<option>Educational</option>
<option>Interesting Facts</option>
</select>
</TD>
</TR>
<TR VALIGN="top">
<TD>Description</TD>
<TD><TEXTAREA NAME="description" id="description" cols="32" ROWS="2" WRAP class="h1"></TEXTAREA></TD>
</TR>
<TR>
<TD> Duration<span class="style1"></span></TD>
<TD><select name="duration" id="duration" class="h1">
<option>1 Day</option>
<option>1 Week</option>
<option>1 Month</option>
<option>3 Months</option>
<option>6 Months</option>
<option>1 Year</option>
<option selected>Until Removed</option></select>
</TD>
</TR>
<TR>
<TD> Tags<span class="style1"></span></TD>
<TD><INPUT NAME="tags" id="tags" TYPE="text" size="43" class="fields"></TD>
</TR>
<TR>
<TD></TD>
<TD><INPUT name="Submit" TYPE="Submit" VALUE="Upload"></TD>
</TR>
</TABLE>
</FORM>