Ligne de table html et php

Par Service Plus, il y a 6 ans


Bonjour,

Voila je rencontre un petit problème avec mon code.
Je veux enregistrer des valeurs dans la ligne de mon table html en Mysql ou bien convertir les lignes des table html en tableau php.

<form method="post" action ="" > <table class="table table-striped table-bordered mediaTable" id="ajouterproduit"> <thead> <tr> <th class="optional">idPRIX</th> <th class="essential persist">idproduits</th> <th class="optional">Prix</th> <th class="optional">Nombre</th> <th class="essential">Edition</th> </tr> </thead> <tr><td><input type='text' name="idprix[]" value='' class='champnaka' disabled /></td> <td><input type='text' name="idproduits[]" value=''class='champnaka' disabled /></td> <td><input type='text' name="prixt[]" value='20000'class='champnaka' disabled /></td> <td><input type='text' name="nombret[]" value='20'class='champnaka' disabled /></td> <td><a href='#' id='supprimer'>Supprimer</a></td></tr> </table> </form>

3 réponses

Nicolas.L, il y a 6 ans

Bonjour,

Afin de t'aider, peux-tu nous montrer ton code ?

Service Plus, il y a 6 ans

<table class="table table-striped table-bordered mediaTable" id="ajouterproduit">
<thead>

            <tr>
                    <th class="optional">idPRIX</th>
                    <th class="essential persist">idproduits</th>
                    <th class="optional">Prix</th>
                    <th class="optional">Nombre</th>
                    <th class="essential">Edition</th>
            </tr>
            </thead>
            <tr><td><input type='text' name="idprix[]" value='' class='champnaka' disabled /></td>
            <td><input type='text' name="idproduits[]" value=''class='champnaka' disabled /></td>
            <td><input type='text' name="prixt[]" value='20000'class='champnaka' disabled /></td>
            <td><input type='text' name="nombret[]" value='20'class='champnaka' disabled /></td>
            <td><a href='#' id='supprimer'>Supprimer</a></td></tr>
        </table>
Service Plus, il y a 6 ans

Merci déjà pour votre reponse, le voici mon code du côté HTML mais du côté PHP je ne sais pas comment faire,

<form method="post" action ="" > <table class="table table-striped table-bordered mediaTable" id="ajouterproduit"> <thead> <tr> <th class="optional">idPRIX</th> <th class="essential persist">idproduits</th> <th class="optional">Prix</th> <th class="optional">Nombre</th> <th class="essential">Edition</th> </tr> </thead> <tr><td><input type='text' name="idprix[]" value='' class='champnaka' disabled /></td> <td><input type='text' name="idproduits[]" value=''class='champnaka' disabled /></td> <td><input type='text' name="prixt[]" value='20000'class='champnaka' disabled /></td> <td><input type='text' name="nombret[]" value='20'class='champnaka' disabled /></td> <td><a href='#' id='supprimer'>Supprimer</a></td></tr> </table> </form>