2

I have a condition for price filtering products in codeigniter...

When user clicks on filter button, lower & higher value as well as that category id of that page is sent to controller...

Now, when user is on that page and clicks on another next page (In pagination).. those all values are gone... how can i set them globally so that even when user goes for next page those lower,higher value and category ids i can use again...

I am using codeigniter's pagination library...

2
  • 3
    Global !== Persistent... if you want persistence for an individual user, use Session Commented Dec 19, 2016 at 14:17
  • @MarkBaker Ohk i will try it..thanks :) Commented Dec 19, 2016 at 14:38

1 Answer 1

2

file location - Application -> Config -> constants.php here you can define global variable

define('BASE_PATH',"/home/example/public_html/");
define('UPLOAD_PATH',BASE_PATH . 'uploads/');


//this is your global variable, can use anywhere in application
   echo $UPLOAD_PATH;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.