Okay
  Public Ticket #1210614
PHP Serialized Array
Closed

Comments

  • geepers started the conversation

    Hi, is possible to use placeholder in the url in PHP Serialized Array?

    I try in many kind but nothing... if use CURRENT_USER_ID in $_GET i have nothing.

    If i try to have the current user id directly in php i have always '0'.

    While if i launch the php page directly i have the id.

    When i fire the page.php from wpdatatables the wp user fn dont work.

    I need the user id to filter data to serialize.

    Please let me know.

    This is my code...

    require_once('../../../../../wp-blog-header.php');

    global $current_user;
    write_log(get_current_user_id());

    if(isset($_GET['protect_nonce'])){
    if($_GET['protect_nonce'] === 'hsgdgyduidoodjhdg63738976463893'){

    $search_criteria = array(
       'status'        => 'active',
    );


    $sorting = array( 'key' => 'date_created', 'direction' => 'DESC' );

    $entries = GFAPI::get_entries( 2, $search_criteria, $sorting );

    $return_array = array();

    foreach($entries as $entry){

    $return_array[] = array(
    'id' => $entry['id'],
    'Nome' => $entry[68],
    'Cognome' => $entry[69]

    );

    }

    echo serialize( $return_array );


    }
    }


  •  1,689
    Miloš replied

    Hi geepers,
    Thank you for your purchase.

    Sorry to disappoint you but unfortunately this functionality is not available at the moment.
    We have some plans to implement this feature for future version but for nor it is not possible.

    Thank you for understanding.
    Best regards.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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