Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2003
Posts: 6
Lurker
Lurker
Offline
Joined: Feb 2003
Posts: 6
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?

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.

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?

Thanks for your help.

JD

Sponsored Links
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
I think you could make the variable global in the ubbt.inc.php file and it would be available on every page.

Code
 global $variable_name; 


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.

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...

Joined: Feb 2003
Posts: 6
Lurker
Lurker
Offline
Joined: Feb 2003
Posts: 6
I don't think a global variable will solve my problem, but thanks for letting me know how to add one (for future use).

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?

Thanks,

JD


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1424
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 26
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)