![]() |
|
Thread Tools |
#1
|
||||
|
||||
Passing additional variables to page using vB authorisation
Hi all,
I have successfully set up a members' area on my site which uses vB as the authorisation and member list. It all works rather well, except for when I want to pass additional variables to a page using this system. I am using the code from http://www.vbulletin.org/forum/showthread.php?t=61112 to log in to the members' area. I'm running vB 3.5. The problem comes when I have a page that requires additional variables to be passed, eg: http://example.com/members/index.php?my_id=1. vB seems to nullify all variables being sent that are not vB variables. I am aware of the reasons for doing so, but don't know of a sensible way of retaining the values of my variables. for use later in the php script. Specifically, the code I am using at the top of each member's page is as follows:
Can you assist please? Many thanks in advance. ![]() No members have liked this post.
|
#2
|
|||
|
|||
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
#3
|
||||
|
||||
Originally Posted by MarcoH64
Thank you very much for your response. Might I just ask whether the code you supplied should be placed before or after the auth. section? I'd imagine it goes before global.php is called... is that correct?
Thanks again. ![]() No members have liked this post.
Last edited by RedFive; 10 Oct 2005 at 09:58. Reason: Typo |
#4
|
|||
|
|||
Wrong
![]() global.php will clear all var's. All coding (accept the 4 special arrays and some defines) should be done after global.php. PS I just noticed that your var is called 'my_ip' and will probably not be numeric, so you better use TYPE_STR instead of TYPE_INT.
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
#5
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
Hmmm, okay, let's try this with a real-world example. Currently, I have my members' area coded as follows (which worked prior to vB 3.5).
The authorisation code is contained in checkauth.php located in the members' directory:
A centralised include file called global.php located in the members' directory is called at the top of every members' area page:
So, would I simply be able to do the following?
Originally Posted by RedFive
In fact, I'll answer my own question.
![]() It works like a dream. Thanks MarcoH64 for your assistance! Regards, Red. No members have liked this post.
Last edited by RedFive; 10 Oct 2005 at 18:33. Reason: Automerged Doublepost |
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 10:43.