Hi,
how to set a cookie:
setcookie('username','frank');
you can read it like normal variable eg:
echo "Username: $username";
But beware, this is not secure!
The User could modify his cookies so you can not be sure, that the username is valid.
I do the following, i have a user table in my db which stores a session ID for a logged in user.
This ID is stored as a cookie or added to every html link
eg a href=www.abc.de?sid=123456789
When i want to display the username i query the database for the current sid and thats it 🙂
Simon