My task for the time being is to set up a webpage that instead of different pages for different states, instead sets up just one page and loads up the appropriate one for the right state.
So instead of this
walmart.com/default.html <-- Gets info using about which state you are in
wal-mart.com/AL/client.html <--- Sends you each states own page
we want this
walmart.com/default.html <-- Loads up like normal
walmart.com/defualt.html?state=AL <-- then does this with the state code for the state
walmart.com/setup.html <-- If the state doesn't have a page, or an error occurs, the setup.html loads
I have no idea what the second part is called, and with that, no code examples to work off of. Any help?
For extra points, make sure that all errors have a case. This way, in the future, you do not have to modify the page much to add additional functionality.
if ( $state == 'AL' ) { do this } if ( $state == 'something else') { do this }
So yeah. Just google JS and the GET function.