Posts: 24
Location: Soldotna, Alaska
|
If you are familar with ASP you could make two session variables. After the login is verified with the database you make these variables:
<%
'Get the username from the text box named txtUsername (uses post method)
Form_Username = Request.Form("txtUsername")
'Store the username in a session variable
Session("username") = Form_Username
'Store the status of their login in a session variable
Session("LoggedIn") = True
%>
Then on the "Welcome Member Page" you would put this code to first check if the user is actually logged in.
<%
'Check if the user has already logged in
If Session("LoggedIn") = False Then 'If not then redirect them to a login error page
Response.Redirect "loginerror.htm" End If
%>
If the processing of the page gets passed that last block of code. Then insert this code where you want to print the username. So something like this:
Welcome <%=Session("username")%>, Thank you for logging in.
<%=Session("username")%>
This part will display the username inside of the session variable to the browser.
Do all of this of course if you are familar with ASP. If you aren't familar with ASP. You can try this:
On your verification page, after the user is verified. Store the username in a cookie on the clients machine that contains their username. Set it to expire immediatly. On the page that you want to print their username back to them. Use client-side javascript to read the contents of the cookie and return their name to them. There is a better way of doing this that involves using the query string. But I only know ASP and PHP so I don't know how you would access it on the response page.
I hope some of this helped you. Good luck with your quest.
__________________
-Dylan Vester
Last edited by D.Viddy; 04-08-2004 at 12:48 AM..
|