Hello! I would like to hear your opinion.
There is an implementation of loading the necessary page, suppose that this code is located at the link http://test.ru/city.php:
<?php switch ($_REQUEST['CITY']) { case moscow: // Если город Москва, то подключаем страницу moscow.php $url = "http://test.ru/moscow.php"; break; default: // Если все остальные города, то подключаем страницу anyone.php $url = "http://test.ru/anyone.php"; } header('Location: ' . $url); exit; ?>
After the loaded page, for example, I want to change the city, I have a special block on the page, with which I select the city I need in the drop-down list and click on it. This block sticks to the URL of the page where I am at the moment, the parameter passed, say, http://test.ru/city.php?CITY = moscow . After that, I downloaded the page http://test.ru/moscow.php , since the parameter passed was moscow . Then I want to change the city again, choose another city from the list, BUT I am already on the page http://test.ru/moscow.php , and it turns out that the URL will look like this http://test.ru/ moscow.php? CITY = anyone , in fact, I will see the same page http://test.ru/moscow.php , but I need to paste the passed parameter again to the URL of the page http://test.ru/city.php . I can not rigidly link the link in the block to the page http://test.ru/city.php , you know, because the city change block attaches the transmitted parameter to the URL of the page I am currently located at. Option to register switch in each page does not give a ride. Please help me figure it out!