Can somebody help me understand how to retrieve user profile data when that user logs-in. I'm relatively new to this and am currently developing a site with javascript, ajax and php. For example in Facebook when a user logs-in their profile data is then displayed in their profile page. Im guessing that there is a default profile html file which is then filled with data using php depending on which user signs in.

I hope this is a clear explanation of my objective. I would like to know what php functions and methods i need to research for this task. And whether my guess is accurate?!

first u need to have a registration system,create mysql table to store all the user informations.
Then you will be able to retrieve the user info.
simply like this

include"config.php";//connect to db
$query=mysql_query("SELECT *FROM  users WHERE email='$email' AND pass='$password'");
$count=mysql_num_rows($query);
if($count==1){
   while($row=mysql_fetch_array($query)){
   //fetch all the user infos

//Display infos


}

}

just Remember Google is ur Friend)there ar millions of tutorials explaining this Thing.


just Remember Google is ur Friend)there ar millions of tutorials explaining this Thing.

^ That's how I learned. Search "user login script" or something like that on Google and you'll find several variations of how to do it.

Thanks alot for your help with this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.