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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:21:04+00:00 2026-06-05T01:21:04+00:00

I’m having diffiiculty with this as I’m following on from somebody elses code, if

  • 0

I’m having diffiiculty with this as I’m following on from somebody elses code, if somebody could help me with this I would appreciate it.

Basically I have a Jqgrid that displays a list of bookings, when you double click a row it opens a jqdialog that displays all the details about their booking.

I have a variable defined which is the booking reference which I want to pass to a php script.

var brData = rowData['bookref'];

I am then trying to send this via ajax:

function getGridRow(brData) {

$.ajax({

    // Request sent from control panel, so send to cp.request.php (which is the handler)
    url: 'scripts/php/bootstrp/all.request.php',
    type: 'POST',

    data: {

        ft: "getDGRow",
        type: 'POST',
        data: 'fnme=getDGRow&row_data='+brData,
        //row_data: rowData,


        id: null,
        condition: null
    },
    dataType: 'xml',
    timeout: 20000,
    error: function(){
        $('#cp-div-error').html('');
        $('#cp-div-error').append('<p>There was an error inserting the data, please try again later.</p>');
        $('#cp-div-error').dialog('open');
    },
    success: function(response){


    }
});

this is the case in all.request.php:

case 'getDGRow':
header('Content-type: text/xml');
DatagridController::getGridRow($_REQUEST['row_data']);
break;

and this is where I want to pass the variable ‘brData’:

public static function getGridRow($row_data) {


    $pdo = new SQL();
    $dbh = $pdo->connect(Database::$serverIP, Database::$serverPort, Database::$dbName, Database::$user, Database::$pass);

    try {

        $query = "SELECT * FROM tblbookings WHERE bookref = '$row_data'";

I’m finding this very confusing at the moment, so any help would be much appreciated. At the moment $row_data is my php function is blank so obviously it isn’t selecting any row from the database.

  • 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-05T01:21:05+00:00Added an answer on June 5, 2026 at 1:21 am

    Start with verifying that the javascript function is not passing a blank variable. Try alerting the variable “brData”. Second, verify if the ajax call is successful, probably by the use of firebug’s console. Third, make sure that the PHP receives it and can enter the function. You may try

    public static function getGridRow($row_data) {
        echo $row_data;
        exit;
    }
    

    in your PHP file and alert the value in your html.

    function getGridRow(brData) {
        $.ajax({
            //...blah blah blah
            success: function(response){
                alert(response);
            }
        });
    }
    

    If you can receive an alert from your scripts, I guess the last thing that you can try is
    query manually to your database using the value of the variable that was sent back to you by your PHP script. Who knows, there really is no result for the produced query.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.