0

my url is

http://localhost/helpinghand_web/home/userAutologin?tval=Eo7TIhTJqQnfysn8mwu2nXOQ0yJvY36hprJ99GJH9NBZHTh1LU&page=profile

there are two parameter tval and page how can i get it. following are not working..

$var=$_GET['tval'];
$var=$this->input->get('tval');
2
  • You can get the complete information about the same from the below give URL : ellislab.com/codeigniter/user-guide/libraries/uri.html Commented Apr 28, 2015 at 10:15
  • are you getting any error ? if not then $this->input->get('tval'); this should work. Commented Apr 28, 2015 at 10:26

4 Answers 4

1

use this

$tval = $this->input->get('tval');
$page = $this->input->get('page');
Sign up to request clarification or add additional context in comments.

Comments

0

You can use this:

$params = $this->input->get(null, true);

to get all the params passed and then use:

$params['tval']

Comments

0

You can use $tval = $this->input->get('tval') for get single data & $tval = $this->input->get() for get all date in singel variable in array format.

Comments

0
 I managed the query you can use it.

If you call www.example.com?tval=1100, it will echo 1100, provided the Home

controller is routed correctly.

You can also use the http://ellislab.com/codeigniter%... to get these parameters.

For your query: $this->input->get('tval', TRUE);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.