Jump to content
Sign in to follow this  

Persistent PHP Variables

Recommended Posts

I am using checkboxes to select specific criteria to use within a MySQL query string.


In my case, as long as the checkboxes do not change, I want to keep the previously selected checkbox values, and pass them on to any additional page sorting that's done after the initial checkbox selection process.


I'm already initializing my MySQL query string successfully, using these checkboxes.


But, once I have the data set that I want to work with, I need the ability to re-sort the columns, or refresh the page, based on my initial selection criteria.


But, I have not been able to get the initially selected criteria to "persist", when I sort the columns, after the select has finished.


How can I take the incoming variables, and make them persistent?


How can I take the incoming variables, and pass them to the sort process?


Thanks in advance.



Share this post

Link to post
Share on other sites

If you want to use them on multiple PHP pages then you can store the values in the session and check for them on each page. You should be able to find a lot of information about the session online.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...