Advertisement

08.14.2007 at 04:23AM PDT, ID: 22761117
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Log in page.

Asked by flfmmqp in Active Server Pages (ASP)

I am trying to create a login screen on my main page which is broken up into 4 frames.  Something you see a lot of these days.  I believe I have the script to have them login but after they have successful done so I want to hide the text boxes and display something that lets them know they are now logged in.  How do I do that?  Maybe even a welcome and the user's name (user_name).  


<%Response.Buffer = TRUE %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY bgColor=#a8a8a8>

<%

session.timeout=20
' Check if the page has been submitted
      strusername = Request.ServerVariables("AUTH_USER")
      Y = instr(strusername, "\")
      x = len(strusername)
      x = x - Y
      strusername = right(strusername, x)      

            if request("username")<>"" OR request("password")<>"" then

                 Set rs = Server.CreateObject("ADODB.Recordset")
                 strSQL = "SELECT * FROM registration WHERE user_name='" & replace(Request("username"),"'","''") & "' and password='" & replace(Request("password"),"'","''") & "'"
                 rs.open strsql, "DSN=FDS_Analogs"

if request("username")= "ho0ctr" and request("password") = "crw" then
                      ' Username and Password match found in database
                      session("loggedin")="True"
                      ' You only need these two next sessions if use the username
                      ' or password somewhere else in the site      
                      session("username")=rs("user_name")
                      session("password")=rs("password")
                      rs.Close
                      'rs = nothing
                      response.redirect request("url")          
else
                 
                 if rs.eof or rs.bof then
                      ' No match found
                      response.write "<FONT color=blue><STRONG>The user name or password you entered are not valid. Please ensure all information was entered in correctly.</strong></font>"
                 else
                      ' Username and Password match found in database
                      session("loggedin")="True"
                      ' You only need these two next sessions if use the username
                      ' or password somewhere else in the site      
                      session("username")=rs("user_name")
                      session("password")=rs("password")
                      rs.Close
                      'rs = nothing
                      response.redirect request("url")          
                 end if    
                 
            end if
end if
%>

<form action="Ext_FARHOME_Left_Sidebar.asp" method=post name=frmPassword>
    <table border="0" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-right: gray thin;
        border-top: gray thin; border-left: gray thin; width: 100%; border-bottom: gray thin;
        height: 10%; text-align: center">
        <tr>
            <td bgcolor="#000000" style="width: 378px; color: black; height: 33px; background-color: firebrick;
                text-align: left">
                <strong><span style="color: white">&nbsp; Login</span></strong></td>
        </tr>
        <tr>
            <td bgcolor="#000000" style="width: 378px; color: black; height: 166px; background-color: transparent;
                text-align: left">
                <span style="font-size: 8pt; font-family: Trebuchet MS">&nbsp;Enter your ID:<br />
                </span>&nbsp;<INPUT id=Text1 name=username value=<%Response.write strusername%>><br />
                <br />
                <span style="font-size: 8pt; font-family: Trebuchet MS">&nbsp;Enter Password:<br />
                </span>&nbsp;<INPUT name=password type=password><br />
                &nbsp;<input type="submit" name="btnSubmit" value="Login"><br />
                <br />
                &nbsp; <a href="javascript:openIEWin('Ext_FARHOME_RegistrationPage.asp')" style="width: 170px;
                    color: #ffffff; border-top-style: none; border-right-style: none; border-left-style: none;
                    border-bottom-style: none"><font color="black" face="Trebuchet MS" onmouseout="this.style.color = 'Black'"
                        onmouseover="this.style.color = 'Red'" size="2"><span>Click to request access to Area
                            Research documents.</span></font></a></td>
        </tr>
    </table>
    <p style="text-align: center">
        <table border="0" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-right: gray thin;
            border-top: gray thin solid; border-left: gray thin; width: 100%; border-bottom: gray thin solid;
            height: 5%; text-align: center">
            <tr>
                <td bgcolor="#000000" style="width: 378px; color: white; height: 33px; background-color: firebrick;
                    text-align: left">
                    <strong>&nbsp; General Information</strong></td>
            </tr>
            <tr>
                <td bgcolor="#000000" style="width: 378px; color: black; height: 67px; background-color: transparent;
                    text-align: left">
                    &nbsp; <a href="javascript:openPDFWin('Mission Statement.pdf')" style="color: #ffffff;
                        border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none">
                        <font color="black" face="Trebuchet MS" onmouseout="this.style.color = 'Black'" onmouseover="this.style.color = 'Red'"
                            size="2"><span>Mission Statement</span></font></a>
                    <br />
                    &nbsp; <a href="javascript:openIEWin('AR_documentation/Karen Hoguet Presentation April 2007.ppt')"
                        style="color: #ffffff; border-top-style: none; border-right-style: none; border-left-style: none;
                        border-bottom-style: none"><font color="black" face="Trebuchet MS" onmouseout="this.style.color = 'Black'"
                            onmouseover="this.style.color = 'Red'" size="2"><span>AR Presentation 4-9-07</span></font></a></td>
            </tr>
        </table>
    </p>


</form>


</BODY>
</HTML>Start Free Trial
[+][-]08.14.2007 at 04:41AM PDT, ID: 19690931

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.14.2007 at 04:51AM PDT, ID: 19690982

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.14.2007 at 04:56AM PDT, ID: 19691006

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.14.2007 at 05:00AM PDT, ID: 19691033

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: bhaspup
Participating Experts: 3
Solution Grade: A
 
 
[+][-]08.14.2007 at 05:18AM PDT, ID: 19691123

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_1_20070628