Welcome Guest, Not a member yet? Register   Sign In
A quick question
#1

[eluser]ppwalks[/eluser]
I was simply wondering about access control, say for example I have a multipage form but i want to restrict access to the any page other than the first but you can only access the other pages from the "next step" link. (hense controlling access)

Basically disable access from direct url, but allow from anchor!

Any ideas how this can be achieved fellow cl operators?

hope thats clear enough.
#2

[eluser]Krzemo[/eluser]
Just use sessions to store last submitted (and correct) form. I.e. if value of session var = 0 it would mean that user hasn't filled any form yet and because of that he has access only to first one. When first one is done, validated correct and saved to wherever you want to store it, change sess var to 1 and etc...
Needless to say that session var status check is a must before form page is displayed (and proper actions must be taken - i.e. redirect to last filled form page)
If you want your application to remember status between sessions you would want to store the status in db and use cookie or make users login. Simple as that...
#3

[eluser]ppwalks[/eluser]
thankyou very much i had a feeling that would be the responce have done that before with just php, was hoping cl had one of its amazing helpers to do it for you..

Thank you




Theme © iAndrew 2016 - Forum software by © MyBB