Access Database and HTML

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I'm working on an internal website for a high school.  I have the sit
separated into two sections: public and internal.  The internal site i
not complete, and i do not know where to begin.  Here's what i want t

- The school runs a Windows network on all of the school's computers.
Students and teachers have their own accounts and email can be checke
over the web on the school's Microsoft Office Exchange site (so logi
names and passwords are accessable to a web script).  I want to lin
these existing user names and passwords to the school's main websit
for access to the internal elements through a login form.

- The school stores student and teacher schedules in an Access databse
I am looking for a way for the internal site to recognize the studen
after login (cookie?) and pull our his or her schedule from the Acces
database.  I can figure out the data presentation once i know how t
pull strands of info from a database.

- I am also curious as to how to keep the internal elements of the sit
off limits to public browsers (it typing in the private directory an
running one of the private pages).

I'm a student in the school and am well versed in HTML, Flash an
JavaScript, and can manage CGI, but have never created an "internal
element to a site.  Any help would be greatly appreciated.



Posted via
View this thread:

Re: Access Database and HTML

elahd wrote:

Quoted text here. Click to load it

Much of what you want to do depends on what web server platform you're
using. On the intranet at work I've set up Apache on Linux web server to
authenticate against the Windows NT network logins using HTTP Basic auth,
mod_auth_pam, pam-smb and Samba. It's not too hard to do, and if you're
not having to cross the Linux-Windows bridge, things should be even easier.

Quoted text here. Click to load it

You really need an IIS server to do this, although Apache on Windows may
do the trick.

Quoted text here. Click to load it

In your CGI scripts grab the IP address of visitor and check it against
a (hopefully known!) list of internal IP addresses.

Toby A Inkster BSc (Hons) ARCS
Contact Me -

Re: Access Database and HTML

Gazing into my crystal ball I observed elahd

Quoted text here. Click to load it

Looks like you have access to IIS, which means can run ASP scripts.

Include something like this in the top of sensitive pages:
<!--#include file="loginchk.asp" -->

<% session("frompage") = request.servervariables("url")
        if request.querystring <> "" then
                session("frompage") = session("frompage") & "?" &
                session("frompage") = session("frompage")
        end if

        if loggedin <> true then
        response.redirect "login.asp"
   end if

<% dim username
   dim password
   dim message
   dim sql

   Set loginrs = Server.CreateObject("ADODB.Recordset")
        sql = "SELECT count(id) "
        sql = sql & " FROM login "
        sql = sql & " WHERE username = '" & request.form("username") & "'"
        sql = sql & " AND password = '" & request.form("password") & "'"
   loginrs.Open sql, yourconnection

   if loginrs.EOF then        
        loggedin = false
        Set loginrs = nothing
        message = "Bad Username or Password"
        loggedin = true
        Set loginrs = nothing
        response.redirect session("frompage")
   end if

Adrienne Boswell
Please respond to the group so others can share

Site Timeline