capturing data from form to another

Results 1 to 3 of 3

Thread: capturing data from form to another

  1. #1
    Join Date
    Dec 1969

    Default capturing data from form to another

    First.asp: contain link to page user.asp<BR>&nbsp;&#060;a href="user.asp"&#062;&#060;b&#062;Home&#060;/b&#062;&#060;/a&#062;&nbsp;<BR><BR><BR>user.asp contain:<BR> <BR><BR><BR>&#060;%<BR>dim username, password<BR>username= request.form("username")<BR>password= request.form("password")<BR>response.buffer = true<BR><BR> if username = "" or password = "" then<BR> response.redirect("Second.asp")<BR> response.write”username and passwored can not be blank”<BR> <BR> end if<BR>%&#062;<BR><BR>The problem is when I hit Home Link at the First.asp to lead me to user.asp and because of the redirect in If statement I am lead to the second page which is Second.asp. The code at First.asp read the redirect if statement because it considered that the username and password are blank.<BR><BR>How can I write a code to capture the username and password and assigned them at the First.asp page and then when I hit Home Link lead me to user.asp which will solve the redirect problem and lead. <BR><BR>Note : I need the redirect in the If statement to proceeded other required actions.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: capturing data from form to another

    this is pretty basic stuff. you&#039;ll find millions of tutorials on login systems at<BR><BR><BR>j

  3. #3
    Join Date
    Dec 1969

    Default Woah! I would NEVER put a username...

    ...and password into the URL. That&#039;s an easy way for a hacker into your system. The best way is to have a login form where the user enters their username and password. This is then submitted to a processing page that checks that the username and password are correct. If they are correct, it sets a session variable to indicate that the user is logged in. Then it redirects to another page or whatever. If they&#039;re not correct, it redirects back to the login form.<BR><BR>On all the other pages you then just need to check the session variable. If it&#039;s set to the correct value, then you know the current user has logged in.<BR><BR>You should NEVER have to check the usernamen and password on EVERY page.<BR><BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts