0

Hello all....i just wanna ask maybe a simple question.....here it is...i
have develop one system..using php ,mysql...and have multiple user login to the system..and..what i want is, after the user log in, all the detail about the logged user would be retrieve in another page based on log in detail that user enter earlier.... so that user do not have to search for their detail again after log in....

i have 3 different table to retrieve the detail from

how do i do it?
pleezz..help...i juz have 2 more days left to finish this system:'(

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by tania88
0

Hey,

You can make a database request based on what the user enters in your login form. For example, if the user enters their username to login, you could say something like:

// Get Username from login form. This could be an email address or
// another type of login information...
$loginname = $_POST['NameofLoginField'];

$query = "SELECT * FROM users WHERE username = '$loginname'";

// Perform Query
$result = mysql_query($query);

// Check result
// This shows the actual query sent to MySQL, and the error. Useful for debugging.
if (!$result) {
    $message  = 'Invalid query: ' . mysql_error() . "\n";
    $message .= 'Whole query: ' . $query;
    die($message);
}

//use result
while ($row = mysql_fetch_assoc($result)) {
    echo $row['firstname'];
    echo $row['lastname'];
    echo $row['address'];
    echo $row['age'];
}

Hope that helps

0

nonshatter,

thanks so much for your reply.....this should help me much.....

This topic has been dead for over six months. 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.