13 August 2019

How to update data in database in wordpress?

<?php

if(isset($_POST["submit"])){
extract($_POST);
$parametername = $_POST['parametersname'];


$id = 4;
/***** updating user *****/
$userstable = $wpdb->prefix . "apindt_parameters";

$where = array(
'ID' => $id
);

$wpdb->update( $userstable,
array(
'parameters_name' => $parametersname,
'wet' => $wet,
'dry' => $dry,
'ac' => $ac,
'dc' => $dc,
'bench_sn' => $benchsn,
'bench_mfg' => $benchmfg,
'bench_model' => $benchmodel,
),

$where);



}

?>

No comments:

Post a Comment

How to add re-captcha v3 on all Elementor forms using coding?

 Add re-captcha v3 on all Elementor forms using coding add_action('wp_footer',function(){     ?> <script src="https://www...