Skip to content
Advertisement

How get value from URL [closed]

I want to get the value from the URL to choose data from the database by ID. I want the value for the id.

For example, if I were to open `www.example.com/index.php?id=12′. I want to get a value whose id = 12 in the database.

If I open `www.example.com/index.php?id=7′.

I want to get the value whose id = 7 in the database and so on.

I have some code:

JavaScript

Advertisement

Answer

Website URL:

JavaScript

Code:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement