[Solved] input data codeigniter always 0 on database


You don’t have a valid submit button in your html code.
Remove your link and use an input type “submit” or a button

Replace :

<div class="form-group">
    <a href="https://stackoverflow.com/questions/29392261/<?= base_url() ?>ipmpab/addIpMpabDb/" class="btn btn-success">
        <span class="glyphicon glyphicon-plus"></span> add
    </a>
</div>

With :

<div class="form-group">
    <button type="submit" class="btn btn-success">
        <span class="glyphicon glyphicon-plus"></span>add 
    </button>
</div>   

… For exemple

Then add the action attribute to the form :

<form method="post" action="<?= site_url('ipmpab/addIpMpabDb'); ?>">

0

solved input data codeigniter always 0 on database