The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
how does sessions work ?
i was wondering about sessions and wondered if anyone was experianced with using this feature and maybe can help a little ?
Say i had a page that had a form and the form sent infomation to another page (say a small popup - not adverts but info) and i would only want that page to display the info if the page i made sent the request ? hope that sounds right it was a little difficult to explain and i think sessions can do this ? for example if someone else sent the request i would want it to display the you do not have permission template ? thanks for any advice |
#2
|
|||
|
|||
you can set session variables like this:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
so if i done something like this from the showpost.php page
insert somewhere PHP Code:
add PHP Code:
thanks very much for the reply |
#4
|
|||
|
|||
well once that is set, it is set for the entire session. you aren't really testing where they came from, you are testing if they have visited the page once during this session.
if you truely want to make sure they came from a certain page, use $_SERVER['HTTP_REFERER']. for example, all you need on the popup page is: PHP Code:
|
#5
|
|||
|
|||
hi sde thanks i already use that method above
but its a problem because many softwares like norton and loads of others block http referer so they wont get the variable i have if they came from showpost anyway thanks very much for the help it looks like im back to the drawing board |
#6
|
|||
|
|||
session does seems like the answer then. you will at least know the user has visited the required page at least once during the session before launching the template.
|
#7
|
|||
|
|||
sorry to bring this back up again but i had some ideas about sessions
just to clarify can that session code you posted above be used between to different php pages (non vb to vbpages) thanks very much would be great if i could trace between pages where the user has been Regards Mickie D |
#8
|
|||
|
|||
maybe something like this would work:
PHP Code:
PHP Code:
for example, with SCRIPT_NAME, these pages would all be the same: /mypage.php?a=1 /mypage.php?a=52 REQUEST_URI includes the query variable in the value. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|