How to make a button in PHP, send data to my mysql table?

3

I placed a button on my page to send the data to a table in mysql.

<button type="button" class="btn btn-block btn-primary">CADASTRAR</button>

How do I, when I click the button it does the register operation in the table, the examples I find is only with the

<input type="submit">Cadastrar

I wanted to do with a button that I customized, how do I?

Thank you

    
asked by anonymous 13.06.2016 / 18:24

1 answer

2

Switch:

<button type="button" class="btn btn-block btn-primary">CADASTRAR</button>

By:

<button type="submit" class="btn btn-block btn-primary">CADASTRAR</button>
    
13.06.2016 / 19:13