ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old September 18th, 2003, 03:31 PM
spworld spworld is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 20 spworld User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Complex for me.Perhaps not 4 you.

Suppose that I have two pages p1.html and p2.asp .p1.html contains a form and the form contents will be processed by p2.asp that also contains something to display.
My question is : How can I prevent users from going directly to the page p2.asp without passing by p1.html ?

Thanks in advance

Reply With Quote
  #2  
Old September 18th, 2003, 06:41 PM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
i think you can check http_referrer, i haven't messed with it too much though....

Reply With Quote
  #3  
Old September 18th, 2003, 09:45 PM
icepricessa's Avatar
icepricessa icepricessa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 199 icepricessa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 10 m 38 sec
Reputation Power: 5
u could try this.. not sure if it'll work

when p2.asp processes the p1.html, u could check for information.. for example
if the form values requested in p2.asp are empty or null then u redirect them to p1.html else you process it and display the other data u have as well.....

hope it helps

Reply With Quote
  #4  
Old September 18th, 2003, 10:32 PM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
Quote:
when p2.asp processes the p1.html, u could check for information.. for example
if the form values requested in p2.asp are empty or null then u redirect them to p1.html else you process it and display the other data u have as well.....

***cringes***...
no, that definately would not be a good idea. Anyone could submit values to this page and crack your page if you're just checking for them to be not null.

Reply With Quote
  #5  
Old September 18th, 2003, 10:58 PM
Chris_Gilbert Chris_Gilbert is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: London
Posts: 166 Chris_Gilbert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 32 m 5 sec
Reputation Power: 6
You could try adding something like

p1.html?submitted=yes

and then check for this in the asp code. It all depends how important it is. This is fairly unsecure as you just need to read the source.

Or if you can make p1 an asp page instead just set a session variable. (Guess you wouldn't be asking the question if p1 could be an asp page though. lol.)
__________________
Thanks in advance

Chris

Reply With Quote
  #6  
Old September 18th, 2003, 11:07 PM
unatratnag unatratnag is offline
Average Intelligence
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 6
Send a message via AIM to unatratnag
this is all you're need, i haven't tested out too much of it's reliablity yet but it seems to get the job done.
PHP Code:
 request.servervariables("http_referer"


Quote:
You could try adding something like

p1.html?submitted=yes

and then check for this in the asp code. It all depends how important it is. This is fairly unsecure as you just need to read the source.

I'm not sure I understand why you'd set a querysting on the first .html page, could you elaborate on that more?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Complex for me.Perhaps not 4 you.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway