Jump to content

Archived

This topic is now archived and is closed to further replies.

witt

General GET usage question

Recommended Posts

Is it better to send IDs or names via GET?

site.com/user.php?uid=2992

or

site.com/user.php?name=hello

Share this post


Link to post
Share on other sites
Totally misread that question :lol:

I use both and determine where i need them.

If it is a known item. I use words.

If it is unknown and could be many I use numbers.

My example
[code]http://localhost/JoshuaJones/blog/index.php?page=comment&action=add&tid=288[/code]

page=comment: I know there are only certian named pages.
action=add: You can either add or read on the comment page
tid=28: The user chose the topic, and I can never know which they want to I use numbers here to make the rest of my realtions easier.

Share this post


Link to post
Share on other sites
I think it should understand both. While numeric id's are easier to program, humans are not good to memorize numbers.

Like:

showprofile.php?p=poirot is easier than showprofile.php?p=8844

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.