Check if row exists before inserting
There are several problems with your function. For example, $tablename points to a table that does not exist. And you don’t need it anyway. If you are trying to create a new user if that email does not exist then try this: function register_user() { global $wpdb; $name = $_POST[‘name’]; $email = $_POST[’email’]; $password = … Read more