Create and delete form fields

0

Colleagues.

I have a system developed this time with PHP of which register in the DB the number of participants of a given event. With these quantities, I create the form fields. See:

    <?php
    ....
    while($jm = mysqli_fetch_object($sqlCampos)){
    ?>

    <input type="text" name="NomePessoas[]" class="form-control" maxlenght="100">

    <?php } // Fim do while($jm = mysqli_fetch_object($sqlCampos)) 
?>

So far everything is fine, but I need to make the user delete or add fields and when adding / deleting, change the amount registered in the DB.

How would I do this in Ajax / Jquery?

Thank you!

    
asked by anonymous 13.09.2015 / 14:00

0 answers