Sunday, June 26, 2022
HomeWordPress Developmentconditional tags - verify that the information exists earlier than sending it...

conditional tags – verify that the information exists earlier than sending it to wpdb


After I ship information to wpdb from type I can have some empty fields.
How can I add situations to array of information inside array or earlier than insert wpdb to ship solely stuffed fields ?

The fields involved (for instance $serializedpaisol has no worth(empty)) have already be checked to know if values exist, however the wpdb->insert discover at all times this information identify however is empty:

if(isset($paisol)){ 
    $serializedpaisol = maybe_serialize($paisol);
}
$information = array(
        'identify' => $_POST['aacl_title'],
        'nicname' => $Acronyme,
        'img' => $idImage,
        'information' => $_POST['aac_description'],
        'resume' => $_POST['aac_resume'],
        'statut' => $serializedcp,
        'mgmt_act' => 1,
        'web site' => $serializedurllink,
        'payment_solutions' => $serializedpaisol,
        'mail'=> $mail,
        'tel'=> $tel,
        'location'=> $serializedloc,
        'date'=> $timeday
    );
    $format = array('%d','%s','%s','%d','%s','%s','%s','%d','%s','%s','%s','%s','%s','%s');
    $desk = $wpdb->prefix.'table_data';
    $wpdb->insert($desk,$information,$format);

After I ship type I get “Discover: Undefined variable: serializedpaisol”

I do not perceive effectively wpdb::put together , does it verify the existence of information worth earlier than to ship to database ?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments