Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:55:09+00:00 2026-06-04T03:55:09+00:00

I am trying to capture a session ID from a URL so that the

  • 0

I am trying to capture a session ID from a URL so that the ID will follow a user throughout the site and then get captured when they fill in a form.

The URL will look something like this.

http://www.mysite.co.za/?campaign=the_campaign_name

Then I inserted this code into the top of my Joomla template file:

session_start();
$_SESSION['campaign']=$_GET['campaign'];

Will this capture the session (the_campaign_name) and will this work with Joomla as I know Joomla uses its own session ID’s?

When I check the sessions I just get a PHPSESSID showing its session.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:55:10+00:00Added an answer on June 4, 2026 at 3:55 am

    yes it should work, joomla is PHP. and what you are trying to do is PHP, if you want to check all the created session variable then try

    session_start();
    var_dump($_SESSION);
    

    Update:

    it seems joomla stores the session variables in database, according to the documentation you need to set and access session variable in joomla like this.

    to set session variable

    $session =& JFactory::getSession();
    $session->set('campaign', $_GET['campaign']);
    

    to get session variable

    $session =& JFactory::getSession();
    echo $session->get('campaign');
    

    it seems joomla upon initialization destroys the regular session variable for some security reason they say, here is the link from joomla documentation to help you http://docs.joomla.org/How_to_access_session_variables_set_by_an_external_script

    hope this helps. and always remember to sanitize user input with proper validation. before using it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to capture the output from tail in follow mode, where it
I am trying to capture sub-strings from a string that looks similar to 'some
I am trying to capture output from an install script (that uses scp) and
I am trying to capture urls in an html page that is being repeated
I'm trying to capture packets from two devices on my network. I have tcpdump
I'm trying to capture the screen and then paint the image to a JFrame
I have these form values I'm trying capture in a session: prop_zip prop_st address
I'm trying to build a site that runs without refreshes, using Jquery and PHP
I'm trying to capture aa,bb,cc from the following strings: ,aa,bb,cc, aa,bb,cc, ,aa,bb,cc aa,bb,cc My
WebDriver->I am trying to capture the 'date' selected from a UI-Calender. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.