Advice needed to finish this statement

Results 1 to 3 of 3

Thread: Advice needed to finish this statement

  1. #1
    David Highlander Guest

    Default Advice needed to finish this statement

    Ok let me explain this code and then hopefully you can tell me how to finish this statement. <BR><BR>Basiclly the code below works like this - a user fills out a form and submits it. That form gets passed to this page and is entered into a database. <BR><BR>On fo the forms that is passed is a check box called "termsofservice" - obviously this is a user accepting the terms of service agreement.<BR><BR>What I am trying to do is write a statement that says if termsofservice does not equal "on" then response.write("You have not accepted the Terms of service. You info will not be added")<BR><BR>The problem is I do not know where to put this statement in my code. What I mean is, if i put it at the end of my code all the data still gets put into the database BEFORE it gets to that message. <BR><BR>I also think I may not be writing that statement correctly so I was hoping for some help.<BR><BR>PLEASE HELP. :-)<BR><BR>&#060;%<BR>if not isempty(Request.Form("Submit")) then<BR> set conn = server.createobject ("adodb.connection")<BR> "client"<BR> conn.Execute "insert into consultantsignup (firstname, lastname, termsofservice) " _<BR> & "values (" _<BR> & "&#039" & Request.Form("firstname") & "&#039, " _<BR> & "&#039" & Request.Form("lastname") & "&#039, " _<BR> & "&#039" & Request.Form("termsofservice")& "&#039)" <BR> <BR>end if<BR>%&#062;

  2. #2
    David Highlander Guest

    Default By the way - this is what I tried

    I tried putting this staement before the database code. But it did not like the word "TRUE"<BR><BR>&#060;%<BR>If Request.Form("termsofservice") &#060;&#062; TRUE<BR>Then<BR>Response.Write("You did not agree to the Supermine Terms of Service. Your information will not be added to the database. You must accept the terms of service to continue.")<BR>Else<BR>%&#062;

  3. #3
    David Highlander Guest

    Default IGNORE - I figured it out

    Thanks guys

Posting Permissions

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