|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
i think you can check http_referrer, i haven't messed with it too much though....
|
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
Quote:
***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. |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
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:
Quote:
I'm not sure I understand why you'd set a querysting on the first .html page, could you elaborate on that more? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Complex for me.Perhaps not 4 you. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|