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 8188731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:01:02+00:00 2026-06-07T03:01:02+00:00

I wonder whether someone could help me please. I’m capturing a Session variable within

  • 0

I wonder whether someone could help me please.

I’m capturing a Session variable within a HTML form as follows:

$lid = $_SESSION['lid'];

From this main HTML form, using the following lines of code, I then load an external ajax table using the ‘mysqlajaxtableeditor` software:

</script> 
 <!-- Set ajax url -->
        <script type="text/javascript">
            trackHistory = false;
            var ajaxUrl = 'Example3.php';
        </script>

<body id="page2" onload="toAjaxTableEditor('update_html','');">

What I’d like to be able to do, is capture the Session variable from the main form and pass it to the external ajax table.

I’ve read a number of posts on this site which I hoped I would be able to solve my problem from, but I just can’t seem to pass the value across.

From what I’ve read, I’ve tried the following on my main form :
var ajaxUrl = 'Example3.php?lid=$lid';, then in the receiving AJAX table script, $lid = $_GET['lid']; but it doesn’t work and i’m not sure where I’m going wrong.

For additional information, I’ve posted the AJAX table code below:

class Example1 extends Common
{
    function initiateEditor()
   {
      $tableColumns['findid'] = array('display_text' => 'Find ID', 'perms' => 'TV');
      $tableColumns['dateoftrip'] = array('display_text' => 'Date of Trip', 'perms' => 'ETV');
      $tableColumns['finddescription'] = array('display_text' => 'Find Description', 'perms' => 'ETV');
      $tableColumns['detectorname'] = array('display_text' => 'Detector Used', 'perms' => 'EVT');
      $tableColumns['searchheadname'] = array('display_text' => 'Search Head Used', 'perms' => 'ETV');
      $tableColumns['pasref'] = array('display_text' => 'PAS Ref.', 'perms' => 'ETV');

      $tableName = 'finds';
      $primaryCol = 'findid';
      $errorFun = array(&$this,'logError');
      $permissions = 'EID';

      require_once('php/AjaxTableEditor.php');
      $this->Editor = new AjaxTableEditor($tableName,$primaryCol,$errorFun,$permissions,$tableColumns);
      $this->Editor->setConfig('tableInfo','cellpadding="1" width="800" class="mateTable"');
      $this->Editor->setConfig('tableTitle','');
      $this->Editor->setConfig('orderByColumn','dateoftrip');
      $this->Editor->setConfig('editRowTitle','Edit Details');
      $this->Editor->setConfig('iconTitle','Edit Find Details');
   }


   function Example1()
   {
      if(isset($_POST['json']))
      {
         session_start();
         $this->mysqlConnect();
         if(ini_get('magic_quotes_gpc'))
         {
            $_POST['json'] = stripslashes($_POST['json']);
         }
         if(function_exists('json_decode'))
         {
            $data = json_decode($_POST['json']);
         }
         else
         {
            require_once('php/JSON.php');
            $js = new Services_JSON();
            $data = $js->decode($_POST['json']);
         }
         if(empty($data->info) && strlen(trim($data->info)) == 0)
         {
            $data->info = '';
         }
         $this->initiateEditor();
         $this->Editor->main($data->action,$data->info);
         if(function_exists('json_encode'))
         {
            echo json_encode($this->Editor->retArr);
         }
         else
         {
            echo $js->encode($this->Editor->retArr);
         }

      }
   }
}
$lte = new Example1();
?>

I just wondered whether someone could possibly look at this please and let me knwo where I’m going wrong?

Many thanks and kind regards

  • 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-07T03:01:03+00:00Added an answer on June 7, 2026 at 3:01 am

    After a lot of work and searching the Internet, I found the solution.

    In the HMTL page I wrote this:

     <!-- Set ajax url -->
            <script type="text/javascript">
                trackHistory = false;
                var ajaxUrl = 'ajaxtable.php?lid=$lid';
            </script>
    <body id="page2" onload="toAjaxTableEditor('update_html','');">
    

    In my receiving AJAX Table Editor software script I wrote:

    function initiateEditor()
    {
        $tableColumns['locationid'] = array('display_text' => '', 'perms' => '','data_filters' => array('filters' => array("='".$_SESSION['lid']."'")), 'default' => $_SESSION['lid']);
    

    I hope this helps someone in the future.

    Kind regards

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

Sidebar

Related Questions

I wonder whether someone could help me please. I have put together a form
I wonder whether someone could help me please. I'm put together the following form
I wonder whether someone could help me please. I'm using Image Uploader from Aurigma,
I wonder whether someone could help me please, From a tutorial I found online
I wonder whether someone can help me please. I've created this form which allows
I wonder whether someone could help me please. I have to admit I'm relatively
I wonder whether someone could please help me. I'm trying to incorporate an 'filesize'
I wonder whether someone could help me please. Through the use of some online
I wonder whether someone could help me please. I've been looking through this, and
I wonder whether someone could help me please. I've been trying to find a

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.