php forum
php mysql forum
php mysql smarty
 
Topic Options
#242098 - 04/07/03 04:32 PM Adding a new session variable to work with existing site
Lazurus Offline
Lurker

Registered: 02/12/03
Posts: 6
Loc: West Virginia
I am trying to put ubbthreads into an existing secure site. I don't want the users to have to retype a username and password to get into the threads area and when they leave the threads area I don't want them to have to re-log in to the main site. How can I send a variable to ubbthreads (or create one) that will always be available for linking back to the main site?<br /><br />I need to send the variable "hpsessid" to ubbthreads so that I can use it on the nav links that point back to the main site. I don't know much about PHP programming, but I'm trying to figure it out as I go along.<br /><br />I have gotten as far as being able to send login data from the existing site to the ubbthreads site so that they are logged in. I even sent the variable hpsessid as PHPSESSID and on the main page it works, but if you go anywhere on the site and then try to hit a link pointing back to the main site, the variable doesn't exist anymore. How do I keep a variable alive to pass through to every page a person goes to?<br /><br />Thanks for your help.<br /><br />JD

Top
#242099 - 04/07/03 11:35 PM Re: Adding a new session variable to work with existing site [Re: brett_sm]
Dalantech Offline
Junior Member

Registered: 02/11/01
Posts: 2392
Loc: Naples, Italy
I think you could make the variable global in the ubbt.inc.php file and it would be available on every page.<br /><br />
Code:
 global $variable_name; 
<br /><br />Change the name of the variable to the varible that you use and it should work. Also I think the variable will have to be defined before you declair it to be global.<br /><br />All of this is off the top of my head at 06:30 in the morning -so back up your existing ubbt.inc.php file first... <img src="/forum/images/graemlins/smile.gif" alt="" /><br />
_________________________
Da LAN Tech

Threads Dev Moderator

Top
#242100 - 04/08/03 08:31 PM Re: Adding a new session variable to work with existing site [Re: jacksonm99]
Lazurus Offline
Lurker

Registered: 02/12/03
Posts: 6
Loc: West Virginia
I don't think a global variable will solve my problem, but thanks for letting me know how to add one (for future use). <br /><br />How would I create a new session variable? The global variable would be the same for everyone right? When a member comes into the ubbthreads area from the main site, they will have their own unique Session ID from the main site and I'm trying to figure out how to create a session variable for it. How do you create a new session variable and keep it for the duration the member is on the site?<br /><br />Thanks,<br /><br />JD

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks