newbie
newbie

Reputation: 1031

pass a variable in the url in zend

I am not able to a pass a variable value in the URL in Zend.

echo '<a href="/page/page-info/page_id/"' .$this->hidden_page_id. '"/">Back</a>';

if I simple echo $this->hidden_page_id I get the value on the above page. But When I pass it above through a link it does not show the value. Do I have to store it in a session or something?

Upvotes: 1

Views: 1298

Answers (1)

Rafael Kassner
Rafael Kassner

Reputation: 1124

What you get when do a var_dump?

var_dump($this->hidden_page_id);

An advice, use View Helpers:

echo '<a href="' . $this->url(array('controller' => 'page', 'action' => 'page-info', 'page_id' => $this->hidden_page_id)) . '">Back</a>';

Upvotes: 3

Related Questions