Welcome Guest, Not a member yet? Register   Sign In
pagination with custom variables
#1

[eluser]Alaa Selim[/eluser]
Hi

i have problem build search pages,i can't pass search variables with pagination i have searched google, and this forum but all i found is simple search with only one variable (per_page) what i need is how to pass more like $keywords,$name..etc

i have used this

Code:
$array = $this->uri->uri_to_assoc(3);
      $keywords = $array['keywords'];    
      $name = $array['name'];
      $age = $array['age'];
$str = $this->uri->assoc_to_uri($array);

with this i add variables to URL but i cant build the right [base_url] for pagination i always get the wrong segment number is there a better way to pass variables or any idea?

Thank you for your time.
#2

[eluser]überfuzz[/eluser]
If you're giong to use uri_to_assoc you need to be cagey making the urls. Could you give an example of the urls?
#3

[eluser]Alaa Selim[/eluser]
Thank you überfuzz,

i actually found a better solution i don't need to save variables in url
i use session to save search variables and it works just fine

Thank you




Theme © iAndrew 2016 - Forum software by © MyBB