Jump to content
Sign in to follow this  
ape_ape_aje

Cmne Nk Buat Login Page Dlm Acces?

Recommended Posts

Saya kat sini nk mintak idea n pendapat brkenaan cmne kite nk buat log in page mggunakan access ye? lebih kurang macam sistem lain la...perlu ade autorized user nk guna sistem....plsss.....help me...dh lama tinggal eccess nih....nk buat small sistem utk staff admin kat ofis

Share this post


Link to post
Share on other sites

ko guna programming apo ni...

ni cth aku buat guna ASP & ADODB.Konecsyen .. erkk :P

<% @language ="javascript" %>
<%
if (Request("submitName")== "Login"){

var DSN = "DSN=database";
var Conn = Server.CreateObject("ADODB.Connection");
Conn.Open(DSN);

rs = Server.CreateObject("ADODB.Recordset");

sql = "SELECT * FROM login WHERE " + "username='" + Request("userLogin") + "' AND " + "password='" + Request("userPassword") + "'";

rs.Open(sql,Conn);

if (rs.EOF){
rs.Close();
rs = null;
Conn.Close();
Conn = null;

Response.Redirect("relogin.asp");
}

else{
rs.Close();
rs = null;
Conn.Close();
Conn = null;
Session("sesi") = "OK";
Response.Redirect("/pharmacy/user/userIndex.asp");

}
}
else{

%>

========

var DSN = "DSN=database";

========

yang tu ko set kat administrator tu... nama database aku ialah 'database.mdb

ps: aku silap ke ni? ker system ko fully access.. ops sorii :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...