Click to See Complete Forum and Search --> : first time asp page! simple answer!


unknown device
06-15-2003, 02:05 PM
hello. i tried to get this done with html alone, but it doesn't seem to work properly. so im sure there's an easy fix using ASP.

all i'm trying to do is pass the information entered in a FORM in an HTML page, to a URL.

here it is:

htmlpage.htm
<html>
<form method="post" action="login.asp">
<input type="text" name="username" size="30">
<input type="text" name="password" size="30">
<input type="submit"> <input type="reset">
</form>
</html>

login.asp
?


so all login.asp has to do is grab the entries from "username" and "password" and output them into a format like so:

http://username:password@ftp.domain.net

and pass the user to the link described above.

thats it! any help would be MUCH appreciated!

Bullschmidt
06-15-2003, 11:46 PM
If you want the form information to go to an URL then change this:
<form method="post" action="login.asp">

To be this instead:
<form method="get" action="login.asp">

unknown device
06-16-2003, 01:41 AM
okay i created a "login.asp" file with the code that dave supplied and all it's doing is displaying the code, instead of physically forwarding the URL.

what am i doing wrong?

Bullschmidt
06-16-2003, 01:46 AM
Well Dave wrote:
str = "http://" & _
Request.Form("username") & ":" & _
Request.Form("password") & "@ftp.domain.net"


And after that you can do whatever you want with the str variable such as this:

Response.Write str

Or this:

Response.Redirect str