I have below query http://localhost/barbadosparliament/result/index?qry=testing
Now i want ot get data of qry parameter from url. But not able to get data. I used $this->uri->segment and also $_GET['qry']. But still i doesn't get that record. How can i get that record.
Asked
Active
Viewed 33 times
1

Nikul
- 1,025
- 1
- 13
- 33
2 Answers
1
try this:
$qry = $this->input->get('qry');
But this should works too
$qry = $_GET['qry'];

Alessandro Minoccheri
- 35,521
- 22
- 122
- 171
1
check you have on in config/config.php
$config['allow_get_array'] = TRUE;
then try
$qry = $this->input->get('qry', TRUE);
$qry = $_GET['qry'];
$qry = $_REQUEST['qry'];
Also try url like

Rakesh Sharma
- 13,680
- 5
- 37
- 44
-
are you getting this on controller result/ function index? – Rakesh Sharma Jul 18 '14 at 06:38
-
function index() { echo $this->input->get('qry'); echo $qry = $_GET['qry']; echo $qry = $_REQUEST['qry']; die; } – Nikul Jul 18 '14 at 06:40
-
try http://stackoverflow.com/questions/2171185/codeigniter-php-framework-need-to-get-query-string – Rakesh Sharma Jul 18 '14 at 06:41