I decided to try to make a grid panel, so that people could choose how many records they displayed, but, again, there were some difficulties.
To save the choice that the user made, I use cookies. If the user navigates through the page: videos? Section = recent & grid = big, then his choice is recorded in the cookie, I do it like this, check if the grid variable is empty, and change it with the switch.
if(isset($_GET['grid'])) { $grid = $_GET['grid']; switch($grid) { case 'low': $grid4 = 'active'; SwitchGrid($connect,$s_id,'&grid=low'); setcookie("grid", 'low', time()+3600, '/'); $cookie = $_COOKIE['grid']; break; case 'medium': $grid3 = 'active'; SwitchGrid($connect,$s_id,'&grid=medium'); setcookie("grid", 'medium', time()+3600, '/'); $cookie = $_COOKIE['grid']; break; case 'big': $grid2 = 'active'; SwitchGrid($connect,$s_id,'&grid=big'); setcookie("grid", 'big', time()+3600, '/'); $cookie = $_COOKIE['grid']; } } Everything is ok. Everything is recorded in a cookie, but now if I go to the menu, say, first by the link videos? Section = recent & grid = big , and then by the link videos? Section = recent & grid = low , then the other links that contain $ cookie variable will not matter the current low, but big, that is, it is not updated when moving to another page, but only if you update the page manually .. I don’t know how to solve it except for JS, but I don’t I know, unfortunately. Can you help?: D
If I didn’t explain very clearly, you can check it yourself here, if the links are not prohibited, of course, the grid panel is to the right, and you need to look at the links Recent, Popular, Following, Suggestion.
ps - sorry for the multi-bookmark.