tirenweb
tirenweb

Reputation: 31749

PHP: question about passing parameters in URL's

i have this two lines:

  var_dump($parametros_post_signin);

  $this->redirect('prueba/aux?email='.$parametros_post_signin['signin']);

the first one prints this:

array
  'signin' => 
    array
      'email_address' => string '' (length=0)
      'password' => string '' (length=0)

the second one takes to another action where i have this code:

var_dump($request->getParameter('email'));

that prints this:

string 'password' (length=8)

I expected it to print something like this:

string '' (length=0)

What should i do to the get value of the 'email_address' field ?

Regards

Javi

Upvotes: 3

Views: 384

Answers (1)

codaddict
codaddict

Reputation: 455400

Try replacing

$parametros_post_signin['signin']

with

$parametros_post_signin['signin']['email_address']

in the 2nd line.

$parametros_post_signin is a 2D array, to get to the email address you'll have to specify two dimensions.

Upvotes: 3

Related Questions