Hi.
I got this code made for my users to upload videos on my site, to my youtube channel.
It works fine, but the user cannot write their own title.
All the videos uploaded are now called "The Movie".. I want the user to make their own title for the video.

Anyone who knows how to do that?
My php skills aren't that good so I would appreciate help.
I've tried with a simple $_POST['title']; but it didn't work.

Here's my code:
Code:
<?php  
//include Zend Gdata Libs  
require_once("Zend/Gdata/ClientLogin.php");  
require_once("Zend/Gdata/HttpClient.php");  
require_once("Zend/Gdata/YouTube.php");  
require_once("Zend/Gdata/App/MediaFileSource.php");  
require_once("Zend/Gdata/App/HttpException.php");  
require_once('Zend/Uri/Http.php');  
  
//yt account info  
$yt_user = 'mail'; //youtube username or gmail account  
$yt_pw = 'pass'; //account password  
$yt_source = 'source'; //name of application (can be anything)  
  
//video path  
$video_url = '/full/path/to/video';  
  
//yt dev key  
$yt_api_key = 'kay'; //your youtube developer key  
  
//login in to YT  
$authenticationURL= 'https://www.google.com/youtube/accounts/ClientLogin';  
$httpClient = Zend_Gdata_ClientLogin::getHttpClient(  
                                          $username = $yt_user,  
                                          $password = $yt_pw,  
                                          $service = 'youtube',  
                                          $client = null,  
                                          $source = $yt_source, // a short string identifying your application  
                                          $loginToken = null,  
                                          $loginCaptcha = null,  
                                          $authenticationURL);  


  
$yt = new Zend_Gdata_YouTube($httpClient, $yt_source, NULL, $yt_api_key);  
  
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();  
  
$filesource = $yt->newMediaFileSource($video_url);  
  
$myVideoEntry = new Zend_Gdata_YouTube_VideoEntry();

$myVideoEntry->setVideoTitle('The Movie');
$myVideoEntry->setVideoDescription('My Test Movie');
$myVideoEntry->setVideoCategory('Autos');
$myVideoEntry->setVideoPrivate();
$myVideoEntry->SetVideoTags('cars, funny');


$tokenHandlerUrl = 'http://gdata.youtube.com/action/GetUploadToken';
$tokenArray = $yt->getFormUploadToken($myVideoEntry, $tokenHandlerUrl);
$tokenValue = $tokenArray['token'];
$postUrl = $tokenArray['url'];


$uploadUrl = "http://uploads.gdata.youtube.com/feeds/users/$yt_user/uploads"; 
// place to redirect user after upload
$nextUrl = 'http://sabinequardon.dk';

// build the form
$form = '<form id="youtube_upload" action="'. $postUrl .'?nexturl='. $nextUrl .
        '" method="post" enctype="multipart/form-data" target="uploader">'. 
        '<input id="title" name="video_title" type="text"/>'.
        '<input id="file_upload" name="file_upload" type="file"/>'. 
        '<input name="token" type="hidden" value="'. $tokenValue .'"/>'.
        '<input value="Upload Video File" type="submit" />'. 
        '</form><iframe id="uploader" name="uploader" style="display: none; width: 500px; height: 200px; border:1px solid #000;"></iframe>
';

echo $form;  

try {
    $control = $myVideoEntry->getControl();
} catch (Zend_Gdata_App_Exception $e) {
    echo $e->getMessage();
}

if ($control instanceof Zend_Gdata_App_Extension_Control) {
    if ($control->getDraft() != null &&
        $control->getDraft()->getText() == 'yes') {
        $state = $myVideoEntry->getVideoState();

        if ($state instanceof Zend_Gdata_YouTube_Extension_State) {
            print 'Upload status: '
                  . $state->getName()
                  .' '.  $state->getText();
        } else {
            print 'Not able to retrieve the video status information'
                  .' yet. ' . "Please try again shortly.\n";
        }
    }
}

?>
You can see the code in "action" here.

Thanks!