This topic is locked

Displaying other field instead of UserID

7/20/2008 6:32:16 AM
PHPRunner General questions
A
allan author

Hi. When a user login with their username, their UserID will be displayed next to the logout button.
The UserID is a long number thus it doesnt looked nice being displayed there. Is that possible to login using the long number but display other field next to the logout button?

J
Jane 7/21/2008

Hi,
use List page: Before display event on the Events tab:

global $conn;

$str = "select FieldName from UsersTable where LoginName='".$_SESSION["UserID"]."'";

$rs = db_query($str,$conn);

$data = db_fetch_array($rs);
$smarty->assing("userid",$data["FieldName"]);



where FieldName and LoginName are your actual field names.

A
allan author 7/22/2008

Thank you