How to pass value into URL? |
[eluser]whygod[/eluser]
hi guys I want to pass a value into URL. Let say that variable name is $email_tmp. and the value is, $email_tmp = '[email protected]'; How to pass $email_tmp into link URL? Thanks in advanced.
[eluser]robertorubioes[/eluser]
Hi, You try it? http://domain.com/controller-foo/[email protected] I think you need know "GET" protocol HTTP. But also you view http://ellislab.com/codeigniter/user-gui...input.html Code: $this->input->get()
[eluser]PhilTem[/eluser]
Code: redirect(urlencode('example.com/controller/method/?email=' . $email_tmp)); even though I would not recommend too extensively passing data via URI parameters. You've got sessions which can store data more securely plus it won't escape the strings. PS: Or a little more fancy techniques used: Code: $uri_params = array('email' => $email_tmp); |
Welcome Guest, Not a member yet? Register Sign In |