Hi pls note below for any mistakes in the code: -
# Displays all details about the user from the database on the screen that is
# stored in a variable content1.
set db [ns_db gethandle]
set selection [ns_db select $db "select user_id,first_names,last_name,screen_nam
e,priv_name,email,priv_email from users"]
set content1 "<table width=100%><tr bgcolor=#c3c3c3<td>User Id</td><td>First Nam
e</td><td>Last Name</td><td>Screen Name</td><td>Private Name</td><td>Email</td><
td>Private Email</td>"
while{[ns_db getrow $db $selection]} {
set_variable_after_query
append content1 "
<tr><td>$user_id</td><td>$first_names</td><td>$last_name</td><td>$screen_na
me</td><td>$priv_name</td><td>$email</td><td>$priv_email</td>"
}
append content1 "</table>"
ns_db releasehandle $db
# Displays all the data.
set page_title "User-Details"
ReturnHeaders
ns_write "
[ad_header Users-Details]
$content1
[ad_footer]
"
Thanks in advance,
Divya