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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Variable

Status
Not open for further replies.

dodgyone

Technical User
Jan 26, 2001
431
GB
I'm using a form that the user fills in and on submit the data is sent to a database.

I would like to be able to automatically record the username of the person (all on NT so this works) and then add this into the database as well...

I'm using <%username=request.servervariables(&quot;logon_user&quot;)%>

... but how do I integrate this with the <form> on the page so that it send this information to the 'Person' field in the database?

Many Thanks,
Marcus
 
use a hidden text box

<input type=&quot;hidden&quot; name=&quot;Login&quot; value=&quot;<%=username%>&quot;>
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Thanks for that Doug... that was virtually what I was doing though my syntax around the work username was wrong...

Just another query...

I am using the If statement to say... if the username = person (field from the database) then show the edit button so that they can edit the record. I have it set so that it's working but I'm not sure how to bring in the field person and also use the username in the statement.

Thanks,
Marcus
 
I've solved it....

<%
username=request.servervariables(&quot;logon_user&quot;)
If username = rs(&quot;Person&quot;) then
%>

... etc etc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top