CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Login name

Print topic Send  topic

Author Message
Tomix
Posted: 07/01/2002, 4:09 AM

PLEASE

How to pass login name from login form to other screens. I am not an expert in the field so please ...

Thanks
Nicole
Posted: 07/01/2002, 6:39 AM

Tomix,
you haven't mentioned what program do you use, so here are:
1. solution for CC. You can retrieve login value using UserID session variable, that is created when user loges in. E.g.:
ASP
Login = dLookUp("table_name", "login_field_name", "user_id_field"= & ToSQL(Session("UserID"), "Number"))
PHP
$Login = dLookUp("table_name", "login_field_name", "user_id_field=". ToSQL(get_session("UserID"), "Number"));

You can find dLookUp() description in CC built in Help.

2. solution for CCS. Retrieve login value using CCGetUserLogin() function. In CCS Login value is stored in separate session variable.
Here is sample code that how to assign login value to field value on the form
ASP
fom_name.field_name.Value = CCGetUserLogin()

PHP
global $<form_name>;
$<form_name>->field_name->SetValue(CCGetUserLogin());

Chris K.
Posted: 07/01/2002, 6:42 AM

If you talk about CodeCharge, you may retrive currently logged user's name using UserID session variable. In PHP you can retrieve this value using get_session("UserID") and in ASP by Session("UserID"). To make this identifier user name you can perform Dlookup function call on your users table:

DLookup("users","user_login","user_id=" & Session("UserID"))
or
DLookup("users","user_login","user_id=" . get_session("UserID"))


If you want to make current user input parameter for some grid or form specify input variable called UserID retrieved from Session and bind it to your form's user identifier field.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.