473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

limit html page access question

Hi!
I'm creating a website that has a few pages... question is, how can I
prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?
Thanks,
Ann
Jul 23 '05 #1
12 2181
Ann D. wrote:
Hi!
I'm creating a website that has a few pages... question is, how can I
prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.


You can't do this with HTML. You would need to use a server-side page
technology like ASP, JSP, PHP to generate your pages dynamically. Then,
you would be able to set a "session variable" when the first page is
requested, a value that is maintained on the server for the duration of
the user's current "session". The second page would check for that
variable. If it exists, the actual content of the second page would be
sent; otherwise, a message notifying the user of his error would be sent
instead--or, for the user's convenience, the second page could redirect
him automatically to the first page.

You could also do this within the web page using cookies and Javascript,
but this technique would fail for any browser in which Javascript is not
present and enabled.
Jul 23 '05 #2
Thanks for the info... So if I change myPage2.htm to myPage3.asp, how
and where does the session variable go? Also, can my site consist of a
bunch of htm and asp files?
As you can probably tell, I'm very new at this.
Thx again,
Ann

Jul 23 '05 #3
an*******@yahoo.ca wrote:
Thanks for the info... So if I change myPage2.htm to myPage3.asp, how
and where does the session variable go?
It's not just a matter of changing the file's extension. You have to
learn how to create an ASP page.
Also, can my site consist of a
bunch of htm and asp files?
Yes, it can have both.
As you can probably tell, I'm very new at this.


That's fine, but you do have to acquire some very basic ASP skill to use
this technique.
Jul 23 '05 #4

"Ann D." <an*******@yahoo.ca> schreef in bericht
news:ae**************************@posting.google.c om...
Hi!
I'm creating a website that has a few pages... question is, how can I
prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?
Thanks,
Ann


I guess the site is not operational yet.
But when it will be:
why would visitors not want to answer your questions?
Are you asking dumb things,
or invading their privacy without any reason?

In other words: try to create a situation in which visitors will love to
complete your questionnaire.

Jakob
Jul 23 '05 #5
For your info Jakob, they are not dumb questions. I'm helping a friend
who's building a site for a Home Builder and this questionnaire is a
customer requirement in order to enable the user to order pdf house
plans. Why the animosity??? I thought this would be a good place to
get some info. Sorry if I'm new at this and asked for assistance.

Jakob wrote:
"Ann D." <an*******@yahoo.ca> schreef in bericht
news:ae**************************@posting.google.c om...
Hi!
I'm creating a website that has a few pages... question is, how can I prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info) to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?
Thanks,
Ann
I guess the site is not operational yet.
But when it will be:
why would visitors not want to answer your questions?
Are you asking dumb things,
or invading their privacy without any reason?

In other words: try to create a situation in which visitors will love

to complete your questionnaire.

Jakob


Jul 23 '05 #6
In article <11**********************@z14g2000cwz.googlegroups .com>,
"an*******@yahoo.ca" <an*******@yahoo.ca> wrote:
For your info Jakob, they are not dumb questions. I'm helping a friend
who's building a site for a Home Builder and this questionnaire is a
customer requirement in order to enable the user to order pdf house
plans. Why the animosity??? I thought this would be a good place to
get some info. Sorry if I'm new at this and asked for assistance.

Jakob wrote:
"Ann D." <an*******@yahoo.ca> schreef in bericht
news:ae**************************@posting.google.c om...
Hi!
I'm creating a website that has a few pages... question is, how can I prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info) to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?
Thanks,
Ann


I guess the site is not operational yet.
But when it will be:
why would visitors not want to answer your questions?
Are you asking dumb things,
or invading their privacy without any reason?

In other words: try to create a situation in which visitors will love

to
complete your questionnaire.

Jakob


I think Jakob's tone (and truthfully, my own reaction to your post) was
that your request has possible "evil" design implications. My reaction
to a site forcing my to answer questions or provide personal information
before I even see the front page evokes a big "I'm SO outta here" along
with a big flame to the site's webmaster if they're in whois.

I don't know how many sites I've visited (eonline.com, nytimes.com,
etc.) that demand you sign-up to view content. They do exactly what you
describe--funnel every new visitor through a login screen and collect
personal information.

Jakobs closing remarks were on par with site guidelines like those
espoused in http://www.websitesthatsuck.com -- make easy and provide
reasons for people to interact with your site rather than a PITA.

You job as the designer of the web page is to counsel the idiot/customer
requesting this design and convince them that this is _not_ a good idea
and won't attract customers to their site.

Good luck. Sounds like you'll need it. And welcome to Internet
newsgroups--start growing an extra layer of skin--this is the way people
interact in news.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 23 '05 #7
On 28 Jan 2005 06:58:07 -0800, an*******@yahoo.ca (Ann D.) wrote:
I'm creating a website that has a few pages... question is,
how can I prevent a user from going directly to a page.
The www is an open forum, designed to be just that, so if you have your
"restricted page" available on a server, you can not "prevent" anything.
i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.
My input is; redesign your own thoughts.
How can I do this?


You can't, unless you are willing to restrict some parts of the world
from access at the same time.

This NG is about authoring _for_ the WWW, not about how to prohibit
people from access to it.

As some one said in another post; your luck is in how well you can
convince your visitors that's it's in their best interest to fill in the
form for you.

"FORCE NEVER WORKS ON INTERNET"

--
Rex
Jul 23 '05 #8
"an*******@yahoo.ca" <an*******@yahoo.ca> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
Jakob wrote:
"Ann D." <an*******@yahoo.ca> schreef in bericht
news:ae**************************@posting.google.c om...
> Hi!
> I'm creating a website that has a few pages... question is, how can I > prevent a user from going directly to a page.
>
> i.e. user has to go through myPage1.asp (page takes some user info) > to get to myPage2.htm. I don't want the user to be able to get to
> myPage2.htm without going through the questionnaire on myPage1.asp.
>
> How can I do this?
> Thanks,
> Ann
I guess the site is not operational yet.
But when it will be:
why would visitors not want to answer your questions?
Are you asking dumb things,
or invading their privacy without any reason?

In other words: try to create a situation in which visitors will love

to
complete your questionnaire.

Jakob

For your info Jakob, they are not dumb questions. I'm helping a friend
who's building a site for a Home Builder and this questionnaire is a
customer requirement in order to enable the user to order pdf house
plans. Why the animosity??? I thought this would be a good place to
get some info. Sorry if I'm new at this and asked for assistance.


Ann:
First, a couple of things that will make life easier:
- post your replies at the bottom, after what you're
referring to, so that the text flows in the same
order as a conversation
- generally, it's better to provide more information,
not less, especially when you are "new". If you
had explained the actual requirement re the ordering
of the PDF files, people may have answered differently :-)

A)
You say "order pdf house plans". You need to explain that.
If you mean "order" as in provide personal information and
take payment details(e.g. credit card info) than that's
a whole other set of issues.
B)
If you mean that the questionaire is intended to act as
a "wizard" to narrow down the available selection of
house plans to those most likely to fit the homebuyer's
needs, then design the process so that someone who wants
to can see the complete list of plans, while still offering
the option of the questionaire/wizard to those that want
to use it.
C)
Design the questionaire/wizard to be browser-neutral, and
include client-side assistance/validation(e.g. via javascript),
but make sure the page(s) function without javascript, and that
all "real" validation is done server-side. Somebody will have
to do some programming on the server(e.g. ASP, PHP, etc).

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 23 '05 #9
Ann D. wrote:
Hi!
I'm creating a website that has a few pages... question is, how can I
prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?


1) set a variable (e.g. PHP session) when the user completes page1,
2) on page2, check that this variable is set, if not redirect to page1.

/Per Jessen, Zürich

--
http://www.spamchek.com/freetrial - sign up for your free 30-day trial now!
Jul 23 '05 #10

"Per Jessen" <pe*@computer.org> wrote in message
news:41**********************@news.easynet.ch...
Ann D. wrote:
Hi!
I'm creating a website that has a few pages... question is, how can I
prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?


1) set a variable (e.g. PHP session) when the user completes page1,
2) on page2, check that this variable is set, if not redirect to page1.

/Per Jessen, Zürich

--
http://www.spamchek.com/freetrial - sign up for your free 30-day trial

now!

Thanks!!! We've got it figured out.
Ann
Jul 23 '05 #11

"Per Jessen" <pe*@computer.org> wrote in message
news:41**********************@news.easynet.ch...
Ann D. wrote:
Hi!
I'm creating a website that has a few pages... question is, how can I
prevent a user from going directly to a page.

i.e. user has to go through myPage1.asp (page takes some user info)
to get to myPage2.htm. I don't want the user to be able to get to
myPage2.htm without going through the questionnaire on myPage1.asp.

How can I do this?


1) set a variable (e.g. PHP session) when the user completes page1,
2) on page2, check that this variable is set, if not redirect to page1.

/Per Jessen, Zürich

--
http://www.spamchek.com/freetrial - sign up for your free 30-day trial

now!

Thanks Per! We've got it up and running now.
Jul 23 '05 #12
an*******@yahoo.ca wrote:
For your info Jakob, they are not dumb questions. [...] Why the animosity??? I thought this would be a good place to get
some info.
It is. More precisely, it's a good place to have discussions about html,
during which information is exchanged.
Sorry if I'm new at this and asked for assistance.


It sounds like you are new at usenet. I'd suggest you learn a bit about
how things work in usenet -- not the technical stuff, but how humans
tend to behave on technical forums such as this one.

http://www.catb.org/~esr/faqs/smart-questions.html

Good luck.

--
Brian
Jul 23 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: indie | last post by:
how to make a user management in php, i mean that i want to limit the user access to my page. the script will not allow 2 user have an access to my page at the same time. the script only allow 1...
6
by: middletree | last post by:
Yesterday, I posted a question which ended up giving me a lot of info, but the core question never got answered/solved. The short version is that when a page displays a number of records based on...
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
11
by: VB Programmer | last post by:
Is there a limit as to how big an aspx page's html can be? (number of characters) Why do I ask? I have a webform with a lot of ActiveX controls (shows up as OBJECT in html). When I place like...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
4
by: pedalchick | last post by:
I'm trying to build a mini-CMS for a friend (ASP.NET 2.0/VB) - just a simple admin page w/ a text box and button that inserts some text into a database (I'm using Access 2003 - text is going into a...
3
by: jon | last post by:
Please Excuse the newbie question, but I have not been able to figure out how to do the following on my own. Assume I have a table called 'reviews' and in that table there are three columns:...
5
by: Nosferatum | last post by:
I am in need of a solution on how to solve this problem: I need to limit access to six different folders. My users are validated in a system which check their prescence with a couple of...
16
by: Nad | last post by:
I have a very large site with valuable information. Is there any way to prevent downloading a large number of articles. Some people want to download the entire site. Any hints or pointers would...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.