lalnamar Posted January 7, 2007 Share Posted January 7, 2007 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=1234567Why 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 More sharing options...
Jessica Posted January 7, 2007 Share Posted January 7, 2007 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 https://forums.phpfreaks.com/topic/33160-what-does-phpid-mean/#findComment-154605 Share on other sites More sharing options...
DarkendSoul Posted January 7, 2007 Share Posted January 7, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.