|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
session help
I'm making a survey for a site and the first page is a login page. The person has to enter in an id number and we check to make sure it is in our database. I just want to make sure that people cannot hotlink past that page and take the survey without using this id number. I am passing it from page to page in session variables but I'm kind of new with sessions. How do I require that the ID number was entered on the first page. Also can any see any other issues were people can skew results? Thanks
|
|
#2
|
|||||
|
|||||
|
RE: session help
I have a multi-page wizard that I don't want people to jump into the middle of, so my solution was simple:
php Code:
Hope it helps! Cheers, Keith. |
|
#3
|
|||
|
|||
|
RE: session help
hi taoism can u explain how that works?
what is all that rt, wizpage1, stuff beside SESSIONS? and how is there an array with sesser... that looks confusing ... how does it check every middle page the user goes to , to see if he's logged in? |
|
#4
|
|||||
|
|||||
|
RE: session help
Ahhh, well, I didn't write it for the poster... I wrote it for my application, so it reflects some of the array structure I store in the session variable.
To break it down in a simpler fashion... The poster needs to check the $_SESSION variable for the existence of an id number... in order to prevent someone from jumping into page3.php instead of going to page1.php and entering a valid id you check for the variable in $_SESSION on every page past the first page... So, to redo my function a touch.... php Code:
better? Sorry, I didn't think the first was so confusing, or I wouldn't have posted it like it is.. Cheers, Keith. |
|
#5
|
|||
|
|||
|
RE: session help
Thanks. I'm now completely comfortable with the session stuff yet so your help was appreciated.
|
|
#6
|
|||
|
|||
|
RE: session help
that was supposed to be "not completely comfortable" instead of "now completely comfortable." HAHA I might want to read want I wrote before I post it.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > session help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|