database – Submiting with problems on one of the options php wprdpress

Hello I having a strange behavior with a simple submit in a page that has to fill some data from 2 inputs. Basically everytime i try inserting without values it insert, if i try and put ‘teste1’ it inserts but it doesnt insert anything than that values more.

down i have the code im using:

        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);

this is only happening in a specific tempalate i created on wordpress and not in the others that have a similar constrution. Already tried recreating the page, configuring a new page.
One more thing its strange, every time i put some other string, it goes to the standard 404 wordpress page. Any Thought?

Best Regards