php - Is it possible to $_GET without an ID? -


I have several pages that use $ _ GET , but only 1 ID is.

For example / view / document / id = 1 I therefore use $ _GET ['id'] which is 1.

Is it possible to do / view / document / 1 and if so, can it be $ _ GET ?

I tried to search online but all I got was reported in sessions for some reason!

Thanks

You use the same way, but to match the URL You need to modify routing ... look up the tutorial to get an idea, because here's a little broad topic for example:


etc. If these links If ever stop being available, then search for url routing or url rewriting .

You just have to specify some rewrite rules, then it is good to go.

If you later use some structure, then they do some stuff for you, but you have to specify some rules for routing in any way, so understanding the basics is a good idea. First is with .htaccess.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -