Several cities in one project [closed]

1

Good afternoon!

I wanted some tips.

I'm developing a project for a classified website, I want to use it with several cities here in the region, how can I make it so that on the same site the user select their city?

For example, the user selects São Paulo the site directs to the São Paulo classifieds. Rio de Janeiro the same thing, etc ...

What do they tell me?

Thank you!

    
asked by anonymous 02.03.2015 / 19:13

1 answer

0

There are several ways to do this, you can do with friendly urls by passing the city parameter directly in the url, eg:

www.mysite.com/saopaulo www.meusite.com.br/riodejaneiro

You can do via the javascript onchange event, by selecting the city from a list (select html) it redirects to the chosen city.

via AJAX and you do not even have to reload the page, just select the city and update the content in the container you specify.

    
02.03.2015 / 19:51