我使用以下代码将表单数据插入到wp数据库中。但它返回"页面未找到"每当我提交任何价值时。
<?php global $wpdb; if(isset($_POST[ "submit"])){ $wpdb->insert( "wp_test_form", array( "name" =>$name, "email" => $email, )); } ?>
<form action="" id="postjob" method="post">
<table>
<tr>
<td>
<label for="name">Name:</label>
</td>
<td>
<input type="text" name="name" id="name" value="" />
</td>
</tr>
<tr>
<td>
<label for="email">E-mail:</label>
</td>
<td>
<input type="text" name="email" id="email" value="" />
</td>
</tr>
<tr>
<td>
<button type="submit" name="submit">Submit</button>
</td>
</tr>
</table>
</form>
&#13;