Solved

How to use Dreamweaver Ultradev to create an ASP login page.

Posted on 2001-07-11
7
506 Views
Last Modified: 2008-02-01
What are the steps involved in creating a login page?  I mean I need specifics here.  I have been to the web site http://www.hiran.desilva.com/ultradev/ where the tutorial is supposed to be absolutely idiot proof.  I must be missing something as it just does not work.  Is there something special to creating an ASP page?  What makes it differ from a file with an html extension?  When the tutorial redirect the user to the page for a correct login it directs them to a xxx.asp file.  What do I put on this page?  I am lost and would really appreciate any help you can give me.  I have read through the tuorial at the above link so many times I almost have it down perfectly.  All the comments say how easy the tutorial is but it is above my head I guess.  Please take me step by painful step so I can get over this password hurdle.

Thank you in advance!

Joe Dunn
0
Comment
Question by:joedunn
7 Comments
 
LVL 33

Expert Comment

by:hongjun
Comment Utility
The site you provided teaches you how to create a login page step by step. Follow it carefully and you should be able to create one.

You actually can use any editor creating the login page example using Notepad, Visual Interdev, etc.

Difference between htm and html extension
There's simply not much difference between the 2 formats except for the below very insignificant issue. Firstly, the earlier versions of windows like 3.1 supports the 8:3 file format meaning 8 characters file name and 3 characters file extension. If .html is used then there may have some problem. Secondly, although .html posed some inconsistencies in the earlier of windows, it will still be able to display its contents in a browser but links <a href="abc.html"></a> that points to a .html file will not do anything. In general, not really a big issue here.

When to use .htm or .asp?
Simple. If your that file has ASP scripts like <%Response.Write%>, then you need to save the file in .asp extension else use a .htm file. If really unsure, use all in .asp extension.

Post what you have now and any error messages here and we will try to help.

hongjun
0
 
LVL 20

Expert Comment

by:Silvers5
Comment Utility
How do I control access to an area?

Creating a login for a section of your web site is fairly easy. First, create a login form (loginForm.asp):
 
<form action=loginHandler.asp method=post>
        Username: <input type=text name='username'><BR>
        Password: <input type=password name='password'><BR>
        <input type=submit Value='Log In'><BR>
</form>
 
 
Next, create a login handler (loginHandler.asp):
 
<%
    '---------------------------------------------------------
    '-- check to see that the form was completely filled out--
    '---------------------------------------------------------
    if request.form("username")="" or request.form("password")="" then
        response.redirect("loginForm.asp")
    end if
 
    '---------------------------------------------------------
    '-- open your database connection and check for a record--
    '---------------------------------------------------------
    set conn = server.createObject("ADODB.Connection")
    conn.open "<insert connection string here>"
    u = lcase(request.form("username"))
    p = lcase(request.form("password"))
    sql = "select lin = count(username) from logintable where lower("
    sql = sql & "username)='" & u & "' and lower(password)='" & p & "'"
    set rs = conn.execute(sql)
     
    '--------------------------------------------------------
    '-- Decide whether to let them in --
    '--------------------------------------------------------
    if rs("lin")<>1 then  
        'access Denied
        response.redirect ("loginForm.asp")
    end if
    session("login")=true
    response.redirect ("hiThere.asp")
%>
 
 
Finally, at the top of each page, you test the session variable that you assigned in the script above:
 
<%
    if not session("login") then
        response.redirect("loginForm.asp")
    end if
%>



note that cookies should be enabled on the client.. (they are by default)
0
 

Accepted Solution

by:
usmanbuxi earned 100 total points
Comment Utility
if u have ultradev4.0 now u can go to this link and would find it very useful http://www.macromedia.com/support/ultradev/building/login_page/

hope it solves your problem..it works for ver 1.0 also
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 33

Expert Comment

by:hongjun
Comment Utility
Any progresses?

hongjun
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
A request has been made (http://www.experts-exchange.com/cleanup/Q_20320237.html) that this question be closed with the following resolution: split b/w hongjun,Silvers5,usmanbuxi

EXPERTS: Please leave any comment regarding this request here; I will return in seven (7) days to close the question.

Netminder
CS Moderator
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Per recommendation, force-accepted.

Netminder
CS Moderator

Silvers5: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20325319
hongjun: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20325318
0
 
LVL 33

Expert Comment

by:hongjun
Comment Utility
Netminder, I guess you forgot to force-accept usmanbuxi's comment.

hongjun
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now