PHP/MySQL programming?

hi , ive made a member profile page and i want to grab the member data from the mysql table and display it on the page.

i want to grab the data from the row associated with the member logged in.


i’m curious about how a user would be able to log in ~without~ you retrieving the user’s row from the table…

that’s when you should be “grabbing”

When the user logs in, store their ID from the database in their session. When they view the profile page, use that ID in the session in your query.

$result = mysql_query("SELECT * FROM users WHERE id = " . $_SESSION['user_id']);
$row = mysql_fetch_array($result);