Click to See Complete Forum and Search --> : need hellp with inserting variables into a line of code


gavinwatson
03-18-2009, 03:23 PM
hi all, new here, please bear with me!

I have an .asp page and I have this line of code which is used by an applet to access the ftp server:

<param name = "url" value = " ftp://username:password@www.mydomain.com">


but i would like to have a form on the page where the the user could input the variables for the username and password and the then <param name> take them from what the user has inputted on the form.

I need to do it this way for two reasons, firstly i have various users and secondly i do not want to leave usernames and passwords hardcoded into the page for anyone to look at the source.

Can anyone help me out with this please?

Thanks in advance for your time.

Kuriyama
03-19-2009, 07:47 AM
You might want to ask this question in the Java forum as your applet will handle this more gracefully.

To do this in ASP. .

Make your form submit to a page where you do some processing on it, then just redirect them to your FTP site.


Response.redirect("ftp://username=" & Request("username") & ".whatever.com")

gavinwatson
03-19-2009, 01:26 PM
hello, thanks fro taking the time to answer.

is it not possible to have the form on the same page? rather than a previous page and a processing page?

thanks again.

Kuriyama
03-19-2009, 01:34 PM
Yup it's easy.

Read up on processing HTML forms with ASP

http://www.tizag.com/aspTutorial/aspFormsGet.php