admin管理员组文章数量:1317906
Hello I having a strange behavior with a simple submit in a page that has to fill some data from 2 inputs. Basically every time i try inserting without values it insert, if i try and put 'teste1' it inserts but it doesn't insert anything than that values more.
down i have the code i'm using for the delete and insert:
if (isset($_POST['addit'])) {
$wpdb->insert($table_name, array(
'names' => $_POST['name'],
'descriptions' => $_POST['description']
));
} elseif(isset($_POST['deleteit'])) {
if ($_POST['deleteid']) {
$wpdb->delete($table_name, array('id'=>$_POST['deleteid']));
}
}
$categories = $wpdb->get_results($sql);
heres the parte where I use it, i have to say that i dont have problemas with the delete option.
<tbody>
<tr class="alternate">
<td>
</td>
<td>
<input type="text" id="name" name="name" value="">
</td>
<td>
<input type="text" id="description" name="description" value="">
</td>
<td>
</td>
<td>
<input type="submit" class="button" name="addit" value="">Actualizar</input>
</td>
</tr>
</tbody>
this is only happening in a specific template i created on WordPress and not in the others that have a similar construction. Already tried recreating the page, configuring a new page.Its a veru simple insert and delete and delete One more thing its strange, every time i put some other string, it goes to the standard 404 WordPress page. Any Thought?
Best Regards
本文标签: databaseSubmiting with problems on one of the options php wprdpress
版权声明:本文标题:database - Submiting with problems on one of the options php wprdpress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742030846a2416412.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论