If I have a table called users how would I get it so that when a person logged into the site and went to a differnet page it would select FName from the db and then display it like:
Hello User! but User would replace with the FName??
Can anyone help.
Thanks
it depends. how are your users being logged in?
i'm storing thier username as session so the query would look like:
SELECT FName from users WHERE username="$username";
$username would be the sessoin variable then
well then, instead of querying the database everytime you want to display the users name, just echo it from the session var. eg;
echo 'Hello '.$_SESSION['FName'];