Solved

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

Posted on 2001-07-11
7
512 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
ID: 6275609
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
ID: 6275845
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
ID: 6485093
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 33

Expert Comment

by:hongjun
ID: 6485322
Any progresses?

hongjun
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7135410
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
ID: 7164016
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
ID: 7166787
Netminder, I guess you forgot to force-accept usmanbuxi's comment.

hongjun
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 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