• Creator
  • #2150602

    Problem with a logon, Logonvalidation, registerentry and register.asp pages


    by 1962wha ·

    I am using frontpage 2002 and access 2002, I have checked to see if database was connected and it is. When testing the pages in the browser it takes me to microsoft Development program showing me the code. How can I correct this.

    Logon.asp Code:

    New Page 1






    <% 'First we create a connection object Set Conn = Server.CreateObject("ADODB.Connection") 'Next, we open the connection object by calling the connection string 'that FrontPage created and stored in the global.asa file when the "store" 'connection was created Conn.Open Application("store_ConnectionString") 'Then we create a record set object and a SQL statement Set RS = Conn.Execute ("SELECT * From Customers WHERE username = '" & Request.Form("username") & "' AND password = '" & Request.Form("password") & "'") 'Loop through the database to check for the users information Do until RS.EOF Pass = RS("Password") Name = RS("username") RS.MoveNext loop 'Close the recordset and database connection RS.Close Conn.Close <% IF Message = "" Then %>

    You have been logged in as: <% Response.Write Session("username") %>

    Please select a page to go to:

      > protected.asp

    <% Else %>

    <% Response.Write Message %>

    <% End IF %>

    <%'If the password given is not in the database then we don't do anything. 'Otherwise, we create the session objects IF pass = "" Then Message = "The Password you entered is either wrong or not found in our database. Please press the BACK button and try again." Else Session("Password") = Pass Session("username") = Name 'Now we will check to see it there is a session object for an original URL. 'This would have been created (as you will see later) if the user first tried 'to visit a protected page. If so, we send them there. If not, we stay here. IF Session("Ori_URL") = "" Then 'do nothing Else Response.redirect(session("Ori_URL")) End IF End IF %>

    New Page 1





    Verify Password



    <% Session("Username") = Request.Form("UserName") Session("Password") = Request.Form("Password") %>
    <% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit. FP_CharSet = "windows-1252" FP_CodePage = 1252 %>

    New Page 1

    <% If Session("Ori_URL") = "logon.asp" Then Else Response.redirect(session("Ori_URL")) End If %>

    <% if 0 then %>

    <% end if %>
    <% fp_sQry="SELECT * FROM Customer" fp_sDefault="" fp_sNoRecords="No records returned." fp_sDataConn="Database1" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=False fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_sColTypes="&ID=3&Username=202&password=202&" fp_iDisplayCols=3 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %>

    <%=FP_FieldVal(fp_rs,"ID")%> <%=FP_FieldVal(fp_rs,"Username")%> <%=FP_FieldVal(fp_rs,"password")%>

    Can anyone help, why is all the pages not loading properly in the browser.



All Answers

Viewing 0 reply threads