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
Share on other sites

Variables stored in the URL are in the array $_GET. The id is the number of the profile.
It is likely in a database and pulled out (from a cached version for the larger ones) each time.

That has nothing to do with sessions.
Link to comment
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.