Unfortunately, you can't use placeholders because they are executed at a later point.
As for the sessions - you can't do it in the file. You need to use it in the method curlGetData. Also you need to use the option CURLOPT_COOKIE for cURL. You can take a look at the solutions online:
Thanks for your patients and apologize for my lack of knowledge. But let me follow up with your suggestion (https://tmsplugins.ticksy.com/ticket/2371194/). Here is a page with WP one form and one Serialized PHP array table as attached snapshot. I need to pass one variable (s) from from to the PHP file.
I am sorry, but unfortunately this questions exceeds what support is covering from the very beginning, and we're going deeper into this.
I apologize, but I cannot provide any more info about this since it falls under custom development. We have a paid customization service, where you can hire one of our developers to do this for you, but unfortunately we don't have the time to accept any customization requests at the moment, and we won't have time in the near future.
I can only recommend these services for customization:
Is there any method user can provide a variable to Serialized PHP array ?
I tried $_SESSION, $GLOBALS that are preset in functions.php but nothing works.
<?php
session_id("Test_Session");
session_start();
$var1 = $_SESSION["USER"];
$var1 = $GLOBAL["USER"];
$data[] = array("Name" => $var1, "Age" => "21");
echo serialize($data);
?>
Any feedback / suggestion would be very appreciated.
Hi again Ning Jiang
What I sent you in the previous ticket (link below) works, you only need to pack the URL in the hook, with GET parameters you receive from front-end.
https://tmsplugins.ticksy.com/ticket/2371194/
Unfortunately, you can't use placeholders because they are executed at a later point.
As for the sessions - you can't do it in the file. You need to use it in the method curlGetData. Also you need to use the option CURLOPT_COOKIE for cURL. You can take a look at the solutions online:
https://stackoverflow.com/questions/2424714/how-to-maintain-session-in-curl-in-php/15374966
https://www.sitepoint.com/community/t/unable-to-store-session-data-in-curl/68411
Please note that these questions fall under customization, and are not supported in the included support for the plugin.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Aleksandar:
Thanks for your patients and apologize for my lack of knowledge. But let me follow up with your suggestion (https://tmsplugins.ticksy.com/ticket/2371194/). Here is a page with WP one form and one Serialized PHP array table as attached snapshot. I need to pass one variable (s) from from to the PHP file.
//front-end form
function mf_s() {
$output = '<form action="' . $_PHP_SELF . '"'.' method="GET">
S<input type="text" name="s"/> <input type="submit" /> </form>';
return $output;
}
add_shortcode( 'mf-s', 'mf_s' );
//Serialized PHP File: http://..../test_table.php
<?php
$s = "John"; //Need to GET value 's' from form
$data[] = array("Name" => $s, "Age" => "21");
echo serialize($data);
?>
Would you please elaborate more about statements and how to use 'apply_filters' ?
"...pack the URL in the hook, with GET parameters you receive from front-end"
$url = apply_filters('wpdatatables_filter_url_php_array', $tableData->content, $this->_wpId);
$serialized_content = apply_filters('wpdatatables_filter_serialized', WDTTools::curlGetData($url), $this->_wpId);
Many thanks for your consideration and input again.
Hi again Ning Jiang
I am sorry, but unfortunately this questions exceeds what support is covering from the very beginning, and we're going deeper into this.
I apologize, but I cannot provide any more info about this since it falls under custom development. We have a paid customization service, where you can hire one of our developers to do this for you, but unfortunately we don't have the time to accept any customization requests at the moment, and we won't have time in the near future.
I can only recommend these services for customization:
https://codeable.io/?ref=l1TW1
https://wpkraken.io/?tms-plugins
They do develop such solutions, so can you please send your inquiry to them?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks for your information.
You're welcome Ning Jiang
Sorry for the inconvenience.
If you need any technical help with the plugin, please open a new ticket, and I'll be glad to help you out.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables