Well, considering that you don't know how to do this, you're probably using cookies. If you're using cookies, i can help. It's really easy. To log in with a cookie, don't just put a few variables in a few cookies. This is a pretty easy trick to use.
//login code
//put this above the <html> tag(whenever or however you output it)
$user = array();
$userdata_sql = "'SELECT * FROM `users` WHERE `id` = $id"; //or however you prefer doing MySQL queries...
$userdata = mysql_query($userdata_sql);
while($userd = mysql_fetch_assoc($userdata))
{
$x = implode(',', $userd);
setcookie('user', $x, time()+999999);
}
//"session" management
//really isn't session variables!
if(isset($_COOKIE["user"]))
{
list($user["name"], $user["id"]) = explode('.', $_COOKIE["user"]);
//the list must be in exact order as the fields in your mysql database.
}
//then just put $user["name"] wherever you want their name to be. simple, no?
It's an easy way to emulate session management without really learning session techniques. It's not near as secure, though.