Global Variables

G

Guest

Im using FP2003, im using the database results wizard to display data from my
database.

I have a login section which requires: "Id" n "pass" obtained from a form.
data is obtained from the database related to that user which all works
fine...

i need to store "id" n "pass" as a global variable so when another page is
loaded up additional data can be obtained from the database also related to
that user

im sure these fields need to be declared in global.asa as global variables
but dont know how to set it up...

any help will be much appretiated...
many thanks
Col
 
T

Thomas A. Rowe

You don't need to store those items, just set a session variable, such as Session("Authenticated") =
1.

Once they have logged in, then at the top of each page insert the following to test if they are
still logged in, if not redirect them back to the login page:

If Session("Authenticated") = 0 Then
Response.Redirect ("login.asp")
End If
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
G

Guest

Hi thomas, thx 4 the reply.
I don't think I will be able to implemet this into my pages. My .asp pages
are generated using frontpage database results wizard and when setting them
up i do the following:

on step 3 of the wizard i click "more options"
then click "criteria"
then "add"

i submit the following criteria:
fieldname = "tenant id" (this is a database field with all user id's)
comparison "Equals"
vaule = id (id is the input obtained from the form) <-- needs to be global var
(the form is setup by clicking on "insert/form/textbox")

like i say it works fine on the login page to display the 1st set of results
but when the user clicks on another page i need those results to be displayed
also been based on "id" which was taken from the form on the previous page

any ideas m8???
 
T

Thomas A. Rowe

Learn to hand code...

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
T

Thomas A. Rowe

There is, but you will need to wait for some to help you do it with the FP database components. I
can only show you how, if you were doing hand coding, which in the long run will allow you to do
almost anything.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
S

Stefan B Rusynko

See http://home.att.net/~codelibrary/FrontPage/tweaks.htm#Passing Query Values

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| surely there must be a way to use a global variable though???
|
| "Thomas A. Rowe" wrote:
|
| > Learn to hand code...
| >
| > --
| > ==============================================
| > Thomas A. Rowe (Microsoft MVP - FrontPage)
| > ==============================================
| > If you feel your current issue is a results of installing
| > a Service Pack or security update, please contact
| > Microsoft Product Support Services:
| > http://support.microsoft.com
| > If the problem can be shown to have been caused by a
| > security update, then there is usually no charge for the call.
| > ==============================================
| >
| > | > > Hi thomas, thx 4 the reply.
| > > I don't think I will be able to implemet this into my pages. My .asp pages
| > > are generated using frontpage database results wizard and when setting them
| > > up i do the following:
| > >
| > > on step 3 of the wizard i click "more options"
| > > then click "criteria"
| > > then "add"
| > >
| > > i submit the following criteria:
| > > fieldname = "tenant id" (this is a database field with all user id's)
| > > comparison "Equals"
| > > vaule = id (id is the input obtained from the form) <-- needs to be global var
| > > (the form is setup by clicking on "insert/form/textbox")
| > >
| > > like i say it works fine on the login page to display the 1st set of results
| > > but when the user clicks on another page i need those results to be displayed
| > > also been based on "id" which was taken from the form on the previous page
| > >
| > > any ideas m8???
| > >
| > > "Thomas A. Rowe" wrote:
| > >
| > >> You don't need to store those items, just set a session variable, such as
| > >> Session("Authenticated") =
| > >> 1.
| > >>
| > >> Once they have logged in, then at the top of each page insert the following to test if they are
| > >> still logged in, if not redirect them back to the login page:
| > >>
| > >> If Session("Authenticated") = 0 Then
| > >> Response.Redirect ("login.asp")
| > >> End If
| > >> --
| > >> ==============================================
| > >> Thomas A. Rowe (Microsoft MVP - FrontPage)
| > >> ==============================================
| > >> If you feel your current issue is a results of installing
| > >> a Service Pack or security update, please contact
| > >> Microsoft Product Support Services:
| > >> http://support.microsoft.com
| > >> If the problem can be shown to have been caused by a
| > >> security update, then there is usually no charge for the call.
| > >> ==============================================
| > >>
| > >> | > >> > Im using FP2003, im using the database results wizard to display data from my
| > >> > database.
| > >> >
| > >> > I have a login section which requires: "Id" n "pass" obtained from a form.
| > >> > data is obtained from the database related to that user which all works
| > >> > fine...
| > >> >
| > >> > i need to store "id" n "pass" as a global variable so when another page is
| > >> > loaded up additional data can be obtained from the database also related to
| > >> > that user
| > >> >
| > >> > im sure these fields need to be declared in global.asa as global variables
| > >> > but dont know how to set it up...
| > >> >
| > >> > any help will be much appretiated...
| > >> > many thanks
| > >> > Col
| > >>
| > >>
| > >>
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top