我已经为我的页面侧边栏创建了一个自定义表单,但表单输入没有保存到may wordpress数据库。谁能帮我一下吗。请参阅下面我的代码。
<?php
if ( isset( $_POST[\'submit\'] ) ){
global $wpdb;
$lplifeinsurance_leads=$wpdb->prefix.\'lplifeinsurance\';
$data=array(
\'quotes\' => $_POST[\'quotes\'],
\'cover\' => $_POST[\'cover\'],
\'health\' => $_POST[\'health\'],
\'provider\' => $_POST[\'provider\'],
\'birthdate\' => $_POST[\'birthdate\'],
\'gender\' => $_POST[\'gender\'],
\'lname\' => $_POST[\'lname\'],
\'address\' => $_POST[\'address\'],
\'number\' => $_POST[\'number\'],
\'email\' => $_POST[\'email\'] );
$wpdb->insert( $lplifeinsurance_leads, $data);
}
?>