0

guy's i need you help. i dont know how to get selected index row of table for inserting the data. example. i have table like this. i've thead (no, tanggal, no.polisi, netto) i want to make insert function just for (no and tanggal) only. how to do that with php? i really dont know how to grab the selected index of the table

i hope someone can give me an example `

<form name="table_1" id="table_1" class="table_1">
<table id="table_1" class="table_1" cellspacing='0' class="js-serial" border="2">
    <thead>
   <tr>
            <th width="50"><center>No.</center></th>
            <th width="100"><center>Tanggal</center></th>
            <th width="80"><center>No.Polisi</center></th>
            <th width="60"><center>Netto</center></th>

  </tr>

    </thead>
    <tbody>

  </tbody>
  </table>
  </form></div>
  <div id="kanan" class="btn btn-default">
  <form name="table_2" id="table_2" class="table_2">
<table id="table_2" class="table_2" cellspacing='0' class="js-serial" border="2">
    <thead>
   <tr>
            <th width="50"><center>No.</center></th>
            <th width="100"><center>Tanggal</center></th>
            <th width="80"><center>No.Polisi</center></th>
            <th width="60"><center>Netto</center></th>

  </tr>

    </thead>
    <tbody>

  </tbody>
  </table>
  </form></div>
  <table>
  <tr>
            <td width=482>Total Keseluruhan Netto :</td>
            <td width=30>
            <input type="text" id="total_netto" class="total_netto" type="text" name="total_netto" size="17"  readonly="readonly" /> </td>

  </tr>
  </table>


`

8
  • use php domxpath query. Commented Apr 7, 2017 at 6:41
  • i need something like a plugin? Commented Apr 7, 2017 at 6:43
  • use jquery to do in easy way. Commented Apr 7, 2017 at 6:46
  • i must define the index 1st with jquery then i call that index into php? right? Commented Apr 7, 2017 at 6:48
  • in jquery call ajax to get data and append that in table. Commented Apr 7, 2017 at 6:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.