Zend Famework: accessing a parameter/variable from view and using them in controller?

What you have between your a and your a tags is the link text. So it doesn't make sense to say that's data. It is merely a strong which is used as linktext.

What you have between your and your tags is the link text. So it doesn't make sense to say that's data. It is merely a strong which is used as linktext.

I advice you to learn / read about PHP before you start using a framework like Zend Framework. What you are asking for is usually done either via $_POST array or $_GET array. The post array can be populated via form submission, the get array can be populated via querystring parameters.

What you want, is a link with parameters like this: Linktext This will populate the $_GET array and you can retrieve the two parameters with: $parameter = $_GET'parameter'; $aotherParameter = $_GET'anotherParameter'; In Zend Framework you could do the same via url view helper and other convencience functions: url(array( 'controller' => 'mycontroller', 'action' => 'my-action', 'parameter' => 'value', 'anotherParameter' => 'anotherValue'), null, TRUE);? > ">Linktext In the action you could get the parameters from the response object like this: $parameter = $this->getRequest->getParam('parameter'); This does essentially the same, the handling of the $_GET array is just wrapped.

1 for learning PHP before any framework, you need to know the web programming basics before hoping to switch to higher gears – Jeff D Oct 7 at 19:02 cool I will try this..thanks – marvsta101 Oct 9 at 9:40 just used it n it worked...once again thanks – marvsta101 Oct 9 at 10:04.

And in controller get that variable $this->getRequest()->getParam('my_variable').

You can keep your variables in session, there is many way how to do it... – tasmaniski Oct 7 at 13:20 1 This is unreadable. BaseUrl is not suitable for creating links. – markus Oct 7 at 13:45 @markus +1 for both points in your comment – Jeff D Oct 7 at 19:03 -1 because your code is just plain wrong.

Too many? 's – vascowhite 01 Oct1 at 2:48 thanks for the advise.. – marvsta101 Oct 9 at 9:40.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send