"?id=" MySQL id query

Basically, I’ve looked around but I can’t find how to create a query that selects from the table where id is the number int he query string of the address e.g. “index.php?id=503” displays the row with the id “503”.

Thanks