Welcome Guest, Not a member yet? Register   Sign In
SEO URIs *AND* $_GET requests - /controller/function/?myvar=1
#4

[eluser]xwero[/eluser]
[quote author="jmun" date="1204159789"]I am trying:

http://mydomain/test/form/?myvar=1

Code:
function form()
{
  $test = $this->input->get();
  var_dump($test);
}

But it returns false. Any ideas?[/quote]
The get method from the input class doesn't mimic the get global. The method retrieves on value based on a key you add as argument. So
Code:
function form()
{
  $test = $this->input->get('myvar');
  var_dump($test);
}
should give you the expected result


Messages In This Thread
SEO URIs *AND* $_GET requests - /controller/function/?myvar=1 - by El Forum - 02-27-2008, 03:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB