0

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?!

3
Contributors
3
Replies
12
Views
7 Years
Discussion Span
Last Post by Hypalink
0

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.

Edited by mrcniceguy: n/a

0


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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.