If I enter the following into the browser:
http://domain.com/script.php?1234
And script.php has the following script:
Nothing can be officially correct, if it works for you then by all means use it. Btw the issue with that is matching what value is what.
When you have example.com?1234&4567
Then you will have two values with no key name to tell you what is what.
But if you want to do away with ugly url's, you should look into mod_rewrite
Beginners guide
Another beginners guide