Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've got the following issue:
I've got a table with orders. On each row there is an Edit button. When I click it a popup opens and the order is loaded to be modified. The problem is that I cannot pass the right value to the SELECT query in php.
PHP
function fnOpenNormalDialogEdit(jQueryParam) {

    <?php

    $phpVar = 'to have the value of jQueryParam';
    $OrderEdit = $wpdb->get_row($wpdb->prepare("SELECT * FROM $EWD_OTP_orders_table_name WHERE Order_ID='%d'", $phpVar));

    .....

}



If I pass
PHP
$phpVar = 19;
for example, the right order is loaded and everything is ok. But I cannot find a way to set that real value....
PHP
$phpVar = 'to have the value of jQueryParam';


I don't want to reload the page, I tried ajax but couldn't do it. Please help

Thanks,
Didi
Posted
Updated 18-Sep-15 5:22am
v2
Comments
Amit Jadli 19-Sep-15 1:14am    
You could use ajax request to php function and pass that value as ajax post data...and retrive value in back end as $_POST or $_GET..

by that way you can easily access data...and you also can send response to the front end...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900