Help with Syntax on Redirect

Results 1 to 3 of 3

Thread: Help with Syntax on Redirect

  1. #1
    K Johns Guest

    Default Help with Syntax on Redirect

    Hi Everyone,<BR> I would like to know how to accomplish this- I have a login page that compares to a database. I ask for it to select the RecordID from the table if the login is correct. Is there any way to get the RecordID into the redirect page? Example being if the username= george and the password= curious the RecordID is 5. So I want the script to redirect to "quotepage.asp?id=5" How would I go about this in my code? Here is my current code if it helps:<BR><BR>dim connectionString<BR>dim conn<BR>dim rs<BR>set conn= Server.CreateObject ("adodb.connection")<BR>conn.Open Application("Connection1_ConnectionString")<BR><BR >set rs= conn.Execute("Select RecID from QNLots Where Username=&#039;"& Request.Form("username")&"&#039; and Password=&#039;"& Request.Form("password")&"&#039;")<BR>If rs.EOF Then<BR>Response.Redirect "fail.asp"<BR>else<BR>Response.Redirect "..quotenow/quotepage.asp"<BR>end if<BR><BR>Thanks in advance,<BR>Kimberly

  2. #2
    Join Date
    Dec 1969

    Default RE: Help with Syntax on Redirect

    dim strRedirect<BR>strRedirect = "..quotenow/quotepage.asp?id=" & rs("RecordID") <BR>Response.Redirect(strRedirect)

  3. #3
    K Johns Guest

    Default RE: Help with Syntax on Redirect

    Thank you Thank you Thank you! :)

Posting Permissions

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