Hi,
a little bit more information!
What I am trying to achieve is a login code which checks the users details in an access database and then redirects them to another page where the user will be welcomed with his/her user name.
The code I have made for the login actions the same page to check the users details! (which I would prefer to keep)
The login page is called login_db.asp and the action is equal to (=) login_db.asp.
What I would like is for the login page (login_db.asp) to action login_db.asp and also action another page called associate.asp.
The associate.asp page will request the user name from login_db.asp and welcome the user with their name. Code is <%=request.form("username" %>
So is there any possibility of being able to action more than one form. Or is there another solution to my problem rather than trying to action more than one page.
I know that it would be easier to make a login.html page, then in the login.html page action an asp page. This asp page will check the user details, then from the same asp page rename the username variable, final finish by redirecting to the last page. The last page will be the page, which welcomes the user by using the renamed username variable. (But I would like to know if there is another solution rather than the route shown in this paragraph)
Here is the Code I have currently---->
<%
If Request.Form("action" <> "validate_login" Then
%>
<form action="login_db.asp" method="post">
<input type="hidden" name="action" value="validate_login" />
<table border="0">
<tr>
<td align="right">Login:</td>
<td><input type="text" name="username" /></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td align="right"></TD>
<td><input type="submit" VALUE="Login" /></td>
</tr>
</table>
</form>
<%
Else
strSQL = "SQL Statment is here!"%>Then
<%response.Redirect "associate.asp"%>
<%
Else
%>
'Login Failed code is here!
<%
'Response.End
End If
' Clean Upcode is here!
End If
%>
Thanks
Manraj
a little bit more information!
What I am trying to achieve is a login code which checks the users details in an access database and then redirects them to another page where the user will be welcomed with his/her user name.
The code I have made for the login actions the same page to check the users details! (which I would prefer to keep)
The login page is called login_db.asp and the action is equal to (=) login_db.asp.
What I would like is for the login page (login_db.asp) to action login_db.asp and also action another page called associate.asp.
The associate.asp page will request the user name from login_db.asp and welcome the user with their name. Code is <%=request.form("username" %>
So is there any possibility of being able to action more than one form. Or is there another solution to my problem rather than trying to action more than one page.
I know that it would be easier to make a login.html page, then in the login.html page action an asp page. This asp page will check the user details, then from the same asp page rename the username variable, final finish by redirecting to the last page. The last page will be the page, which welcomes the user by using the renamed username variable. (But I would like to know if there is another solution rather than the route shown in this paragraph)
Here is the Code I have currently---->
<%
If Request.Form("action" <> "validate_login" Then
%>
<form action="login_db.asp" method="post">
<input type="hidden" name="action" value="validate_login" />
<table border="0">
<tr>
<td align="right">Login:</td>
<td><input type="text" name="username" /></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td align="right"></TD>
<td><input type="submit" VALUE="Login" /></td>
</tr>
</table>
</form>
<%
Else
strSQL = "SQL Statment is here!"%>Then
<%response.Redirect "associate.asp"%>
<%
Else
%>
'Login Failed code is here!
<%
'Response.End
End If
' Clean Upcode is here!
End If
%>
Thanks
Manraj