Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8994211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:22:33+00:00 2026-06-15T23:22:33+00:00

In my controller, i want to send a variable to a certain view before

  • 0

In my controller, i want to send a variable to a certain view before redirecting the user to it:

class IndexController extends Zend_Controller_Action {

      public function permissionAction() 
      {
    /*....*/
              $this->view->inscription->email = $params['email'];

              $this->_redirect('/inscription'); // redirection to the inscription view

      }
}

In my inscription view: i try to get the variable with this:

<?php echo $this->email; ?>

But it’s not working…(displays “null”)
Can anyone help me?
Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:22:34+00:00Added an answer on June 15, 2026 at 11:22 pm

    Variables you assign to the view only last for the duration of the current request. Since you are redirecting the user to another URL (telling their browser to make another request to /inscription), that data is lost.

    Either render the data in the permissions action, use _forward instead of _redirect, or store the data in the session. It’s hard to know which of these is most appropriate without knowing exactly what this action and the inscription action do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to call a controller function from a view. Is that possible in
All, I want to send a variable itemId via GET to a controller action
I want to send Ajax request to controller, I make like this in the
I'm using a g:select (actually, a g:currencySelect) in my view. I want a controller
I want to show data that returned from controller, in onComplete function: function onComplete()
I want to send json data from my asp.net MVC controller in C# and
I am using ASP.NET MVC2 for my project. I want to send the user
I want to send a string data with jquery load function but its not
When to use ViewBag, ViewData, or TempData in view. In the controller i want
I want to send the list of objects from jsp to controller. Actually i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.