Plugin won’t insert data into new table
-
I’ve created a new table to hold form data, but I can’t get my plugin to insert any new records. Here’s the code I’m using:
$wpdb->query("INSERT INTO wp_reg (ID, slname, sfname, plname, pfname, email, phone, cellphone) VALUES (NULL, $slname, $sfname, $plname, $pfname, $email, $phone, $cellphone)");
Can someone who knows more about PHP, MySQL, and the $wpdb class help me figure out how to get this to work? (And if there’s nothing wrong with the code, might there be something wrong with how the database is set up that would prevent new records being inserted?)
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Plugin won’t insert data into new table’ is closed to new replies.