I would like to put a greeting on the pages once a user logs in. The username from the login is a field in my database. Based on that field, I would like to display something like "Greetings {First_Name}" where {First_Name} is another field and is based on a search of the database for the username. I hope this explains what I need.
Apr 18, 2000, 10:58 AM
Veteran / Moderator (8669 posts)
Apr 18, 2000, 10:58 AM
Post #2 of 3
Views: 1734
In sub html_home, right at the beginning, add
my ($status, @hits) = &query("view");
if ($status eq 'ok') {
%rec = &array_to_hash(0,@hits);
}
Then, in the place where you want to print out the user's name, use (within a print statement)
------------------
JPD
Code:
$in{$db_cols[$auth_user_field]} = $db_userid; my ($status, @hits) = &query("view");
if ($status eq 'ok') {
%rec = &array_to_hash(0,@hits);
}
Then, in the place where you want to print out the user's name, use (within a print statement)
Code:
Greetings, $rec{'First_Name'}------------------
JPD