Need help with an IF, THEN

Results 1 to 2 of 2

Thread: Need help with an IF, THEN

  1. #1
    David Highlander Guest

    Default Need help with an IF, THEN

    Ok what I have done on the page before this is writen a search script that allows users on the page to enter search criteria and then display the results. <BR><BR>I have asked all the users to enter their username and password. <BR><BR>I am trying to write this script, and I am stuck on the VERY last line. Here is the script and I have more comments below: <BR><BR><BR>&#060;%<BR>Dim Sqlstring<BR>Sqlstring = "SELECT username, password FROM clientsignup WHERE username=&#039" & Request.Form.Item("username") & "&#039 AND password=&#039" & Request.Form.Item("password") & "&#039"<BR><BR>Dim conn2<BR>Dim UserRecordset2<BR>Set conn2 = Server.CreateObject("ADODB.Connection")<BR>conn.op en ("client")<BR>Set UserRecordset2 = Server.CreateObject("ADODB.Recordset")<BR>UserReco rdset.Open Sqlstring, conn2<BR><BR>If Then<BR>%&#062;<BR><BR>Ok this If, Then staement - what I am trying to make this say is that IF the USERNAME AND the PASSWORD match then move on - but if they DO NOT I want it to say soemthing like "You need to register" or what ever.<BR><BR>But I cannot figure out how to write that IF, THEN statement.

  2. #2
    Join Date
    Dec 1969

    Default RE: Need help with an IF, THEN

    If not UserRecordset2.EOF Then<BR>... Continue Code<BR>Else<BR>Response.Write "You need to register"<BR>End If<BR><BR><BR>HTH<BR><BR>Jerry

Posting Permissions

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