Welcome Guest, Not a member yet? Register   Sign In
uri problem
#1

[eluser]dimis[/eluser]
I have a form that change the language of the site and then redirect at the previous page.
I use the
Code:
$this->uri->uri_string
.
My problem is that I have a search page with pagination and I use the enable query string (true), so when I am at the second page of the search page (/search?per_page=10)the
Code:
$this->uri->uri_string
returns nothing.How can I solve it?
Dimis
#2

[eluser]Jonathon Hill[/eluser]
Code:
function current_url($unset = array()) {
        $get = array_diff_key($_GET, (array) $unset);
        $url =
            (($_SERVER['HTTPS'] == 'on')? 'https://' : 'http://').
            $_SERVER['SERVER_NAME'].
            $_SERVER['REQUEST_URI'].
            ((count($_GET) > 0)? '?'.http_build_query($get) : '');
        return $url;
    }




Theme © iAndrew 2016 - Forum software by © MyBB