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 create youtube videos slider with play and pause option in wordpress?

Create youtube videos slider with play and pause option in wordpress youtube videos slider Use this shortcode:- [punjab_today] function my_...