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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:16:58+00:00 2026-06-09T21:16:58+00:00

Hi I need to pass a variable called $process_id to the file config/update.php which

  • 0

Hi I need to pass a variable called $process_id to the file "config/update.php" which is the file responsible for live table updating using DataTables.Editable.

This variable is an integer used to create a table (e.g. table1) so to update the specific table I need to have UPDATE table$process_id SET... and to be able to do that I need to pass that variable to the script that updates the table.

Here’s what I came up with after some research on the Datatables.Editable Wiki:

DataTables initialisation and addition of makeEditable function:

$('#example').dataTable().makeEditable({
    sUpdateURL: "config/update.php",
    oUpdateParameters: { 
        "process_id": "<?php echo $process_id; ?>"
    }
});

And the update.php file

<?php
$id = $_REQUEST['id'] ;
$value = $_REQUEST['value'] ;
$column = $_REQUEST['columnName'] ;
$columnPosition = $_REQUEST['columnPosition'] ;
$columnId = $_REQUEST['columnId'] ;
$rowId = $_REQUEST['rowId'] ;
$column_name = trim($column);

$process_id = $_REQUEST['process_id'];

include("config.php");

// mysql_query(" UPDATE $sTable SET $column = $value WHERE trl_id = $id ");
mysql_query("UPDATE tw_tg_sim_lines$process_id SET $column_name = '$value' WHERE trl_id = '$id'");

echo $id;

?>

I have already tried the different methods such as $_POST, $_GET and $_REQUEST. Nothing seems to work, so the problem is in the oUpdateParameters.

Any help would be much appreciated, thank you.

  • 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-09T21:17:00+00:00Added an answer on June 9, 2026 at 9:17 pm

    I guess you need to make an ajax call to the php script

    this worked for me in the past using jquery

    var dataString = ('process_id='+ <?php echo $process_id; ?>);
    
       $.ajax({
          type: "GET",
          url: "config/update.php",
          data: dataString,
          success: function(data) {
            $('.result').html(data);
            alert('Load was performed.');
          }
        });
    

    refrenced here http://api.jquery.com/jQuery.ajax/

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

Sidebar

Related Questions

I have a variable inside my php file, which I want to pass to
I need to call a script called build_report.php, pass in a URL variable named
I need to pass a variable which is captured from client side via jquery
I need to pass argument to JNLP dynamically for which I tried using a
On my webpage I need to pass a variable called deskname to a popup.
Possible Duplicate: How to pass a PHP variable to Javascript? I need to somehow
I need to pass a variable in dispatcher tag... for instance var google:EventName =
I need to pass a variable to a javascript function,but I got a little
I am trying to call Ajax with jQuery and need to pass a variable
http://www.domainname.com/#changepassword I need to pass an extra variable with a URL like above. I've

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.