I have a HTML form on my CakePHP application that passes a variable that is usually over 30 characters long through to my new Symfony2 application. I'm able to pass the variable from the form to Symfony without issue. However, when I echo the variable that's been passed to Symfony the variable only seems to contain just the first character of the 30/40 character sequence.
The variable is usually like this: T2psbWFGWjNXbTRob3p0VGEwVENheVZvTVRSRFRVUnFLMDVmYVhnaU5ucFJNVWgzZVZSUlRXOXI=
The HTML form used by CakePHP is like this:
<form id="TestForm" method="POST" action="/web/app_dev.php/instructors/passport/" name="input">
<input type="text" value="UkVsS1JtMW1VRFZvT21raU1HVXJVQ3RaTVRSS2JVd3JWRjVxVEdnbVZEUkZiakZsV2pjemNVWTM=" name="value">
<input type="submit" value="Go to the New Database">
</form>
The Symfony2 code is like this:
public function passportAction(Request $request)
{
$passport = $this->getRequest()->get("value");
// Get variables from the search form
$value = $passport['value'];
$session = new Session();
$session->start();
$session->set('passport', $value);
$sessionval = $session->get('passport');
print_r($sessionval);
return $this->render('DatabaseBundle:Default:test.html.twig', array(
'pagename' => 'Database Does Not Exist',
'branchname' => 'Test Branch',
'group' => '0',
'something' => $sessionval
));
}
With this code, and using that variable, in Symfony2 the only thing that is displayed when the variable is echoed is T
. What is going on?