cybergolflesson
New Member
Can get images to upload and hoping to get help on how to upload videos instead. Don't really care if images upload but I really want to allow videos to upload. Hope you can help...here's my code
my html page...
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<table width="100%" border="0">
<tr>
<th bgcolor="#FF0000" scope="col"><span class="style47">UPLOAD - get help</span></th>
</tr>
</table>
<p class="style77">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
<span class="style54">Choose a swing to upload: </span>
<input name="uploadedfile" type="file" />
<br />
<input type="submit" value="Upload Swing" />
</p>
</form>
my php page...
<?PHP
// Where the file is going to be placed
$target_path = "uploadsvideo/";
/* Add the original filename to our target path.
Result is "uploadsvideo/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
echo "<pre>";
print_r($_FILES['media'])
echo "</pre>";
$target_path = "uploadsvideo/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded successfully";
} else{
echo "There was an error uploading the file, please try again!";
}
?>
my html page...
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<table width="100%" border="0">
<tr>
<th bgcolor="#FF0000" scope="col"><span class="style47">UPLOAD - get help</span></th>
</tr>
</table>
<p class="style77">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
<span class="style54">Choose a swing to upload: </span>
<input name="uploadedfile" type="file" />
<br />
<input type="submit" value="Upload Swing" />
</p>
</form>
my php page...
<?PHP
// Where the file is going to be placed
$target_path = "uploadsvideo/";
/* Add the original filename to our target path.
Result is "uploadsvideo/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
echo "<pre>";
print_r($_FILES['media'])
echo "</pre>";
$target_path = "uploadsvideo/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded successfully";
} else{
echo "There was an error uploading the file, please try again!";
}
?>