Jump to content

What does ".php?ID=" mean?


lalnamar

Recommended Posts

I noticed that when i visit facebook (or many other sites, for that matter), i get a link that terminates with .php?id=(number)
example:
http://ufl.facebook.com/profile.php?id=1234567

Why does the url terminate that way? What i'm trying to figure out is how exactly sites like facebook/myspace store the user information. Is it stored in a database and retrieved every time the user's information is requested? Is the .php?id part like a session id, or what?
Link to comment
https://forums.phpfreaks.com/topic/33160-what-does-phpid-mean/
Share on other sites

I believe that this retrieves the information each time the page is requested...

This uses the value set in the URL ($_GET['id']) and requests the information from the database and then outputs (if any) the information.

The code could look something like this;

[code]$user_info = mysql_select("SELECT * FROM users WHERE id = '{$_GET['id']}'");[/code]

if that helps you any.
Link to comment
https://forums.phpfreaks.com/topic/33160-what-does-phpid-mean/#findComment-154612
Share on other sites

Archived

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

×
×
  • Create New...

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.