This topic is locked

using multiple tables?

12/19/2003 12:17:33 PM
ASPRunnerPro General questions
D
daze author

i want to use asprunner to build an admin section for my site, which uses multiple tables in 1 access database. i'd like there to be one login page which allows me to get into the system.
basically, i have 3 tables created in 1 db. table #1 is called Users, which contains user/pass info. table #2 is called News, which contains site text. table #3 is called Events, which contains calendar information. I want to know if there is an easy way to login to the admin system and be presented with a menu (which i can create if asprunner cant) that lets me edit the Users table... or lets me edit the News table... or lets me edit the Events table. I dont want to have to login to 3 separate systems to do these tasks.
thanks,

jason.

Sergey Kornilov 12/19/2003

Jason,
here is what you can do. First of all build ASP code for all three tables including login page for each table. Pick any login page (<table1>_login.asp) that you like to use as your application entry and change line 38 from

Response.Redirect "<table1>_list.asp"


to

Response.Redirect "menu.asp"


After that create new page named menu.asp and put this code there:

<%@ Language=VBScript %>
<%

If Session("UserID")="" Then

Response.Redirect "<table1>_login.asp"

End If

%>
<a href="<table1_list.asp">Table 1</a><br>

<a href="<table2_list.asp">Table 2</a><br>

<a href="<table3_list.asp">Table 3</a><br>


Do not forget to replace table1, table2, table3 with real table names.
I hope this helps.
Best regards,

Sergey Kornilov

D
daze author 12/19/2003

thanks, sergey. much appreciated!

Becca 12/29/2003

Just a quick note...I found that I had to change the Response.Redirect on both lines 35 and 68 (not 38) to get this to work properly.