Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Welcome, USERNAME?

Status
Not open for further replies.

jennuhw

MIS
Apr 18, 2001
426
US
I have followed the Knowledge Base article: to setup logging into my website. I have altered the code to do what I want it to. The logon database that I created has the username and password like the article states. I also have the same UID in another database with the actual username. I want to be able to have them to go the secure page and see their username. This is my code on the secure page to bring up the username from the database:

<%
fp_sQry=&quot;SELECT * FROM Information WHERE (UID = '<%=FP_FieldVal(fp_rs,&quot;UID&quot;)%>')&quot;
fp_sDefault=&quot;&quot;
fp_sNoRecords=&quot;<tr><td colspan=1 align=left width=&quot;&quot;100%&quot;&quot;>No records returned.</td></tr>&quot;
fp_sDataConn=&quot;Database4&quot;
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=&quot;Name&quot;
fp_sMenuValue=&quot;Name&quot;
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>

Any ideas? Thanks!
 
Does anyone have any ideas? I have altered the code to have a search form on the page. I can have it automatically bring up the UID, but I have to submit the query for it to bring up the username. Please help! Thanks!
 
You would have to join the tables with some SQL statements.

Lets say you have a table Login with UID and password and another table User_info with UID, Name, whatever.

In SQL you would join these tables through the UID.

select L.UID
U.name
from login L,
User_info U
where L.UID = U.UID

If you have not setup this join, you will never be able to see the username with the UID.

Look at and for some basic login scripts. There are many free scripts available that will do exactly what you want (and more). No need to invent the wheel...

Njit ---
It's never too late to do the Right thing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top