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

more info--on actioning twice from one form!

Status
Not open for further replies.

Govnor

Technical User
Sep 3, 2002
55
GB
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(&quot;username&quot;) %>

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(&quot;action&quot;) <> &quot;validate_login&quot; Then
%>
<form action=&quot;login_db.asp&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;validate_login&quot; />

<table border=&quot;0&quot;>
<tr>
<td align=&quot;right&quot;>Login:</td>
<td><input type=&quot;text&quot; name=&quot;username&quot; /></td>
</tr>
<tr>
<td align=&quot;right&quot;>Password:</td>
<td><input type=&quot;password&quot; name=&quot;password&quot; /></td>
</tr>
<tr>
<td align=&quot;right&quot;></TD>
<td><input type=&quot;submit&quot; VALUE=&quot;Login&quot; /></td>
</tr>
</table>
</form>
<%
Else
strSQL = &quot;SQL Statment is here!&quot;%>Then

<%response.Redirect &quot;associate.asp&quot;%>

<%
Else
%>
'Login Failed code is here!
<%
'Response.End
End If

' Clean Upcode is here!
End If
%>

Thanks
Manraj
 
Hi mate,

You have posted another thread without even replying to the original. There are posts in that thread and you seem to have ignored them.

It is common courtesy to reply letting the people know if it helped or not and post in the same thread.

Besides that, this post belongs in the ASP forum and not here.

hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top