I have this url
http://www.test.com/home-package/?location=locationA&bed=3&bath=4
and a variable (e.g. $location = "locationB") which holds the value user has selected when they land on the website. They can also change this location from any page they want and the variable will be updated with that location.
What I'm trying to achieve is,
If user is browsing http://www.test.com/home-package/?location=locationA&bed=3&bath=4 and then change the location to 'locationB', I want the url to update to http://www.test.com/home-package/?location=locationB
Hope I have made this clear.
Edit 1: User is selecting location from a dropdown list. <select>
is wrapped inside <form>
and upon hitting save, the value of location is saved in a session variable.
Thanks.