What you intend to do in implementing a user
authentification ; there's many way of doing
it.
For instance, you can use a "cookie".
The idea in short : A person log in, typing
for the first time its login & password,
then your PHP program ask the browser of this
person to store a cookie, which is a small
text string; the next time the person go
on your site, the first thing your prog
do, before asking a login & password, is to ask the person's browser "if there's a cookie
already stored ?"
if true, the cookie is send back to your
PHP program by the browser (automaticly), which look in the db
("SELECT login FROM sessions WHERE sessionid
='$cookie_value') for who the cookie
value is corresponding to, and then your PHP
program can get the login, name, etc. without
asking anything to the user.
There are many other things to say on that
subject ; You should check some good books
on the subject (like 'PHP & MySQL')
or articles here on phpbuilder