Scroll to top

How to insert data into database via wordpress?

<?php
$name = $_POST['name'];
$email = $_POST['email'];

global
$wpdb;
$table_name = $wpdb->prefix . "jaspreet";
$wpdb->insert($table_name, array('name' => $name, 'email' => $email) );

?>

Leave a Reply

Your email address will not be published.