php - How to place checkbox in each and every row in a dynamically generated table? -



php - How to place checkbox in each and every row in a dynamically generated table? -

i generating table dynamically based on columns selected user. able it. code.

<?php if (($getdata)||(mysql_errno == 0)) { echo "<table width='100%' > <thead><tr>"; if (mysql_num_rows($getdata)>0) { $i = 0; while ($i < mysql_num_fields($getdata)) { echo "<th align='center'>". mysql_field_name($getdata, $i) . "</th>"; $i++; } echo "</tr></thead>"; echo "<tbody>"; while ($rows = mysql_fetch_array($getdata,mysql_assoc)) { echo "<tr >"; foreach ($rows $data) { echo "<td align='center' width='auto'>". $data . "</td>"; } } }else{ echo "<tr><td colspan='" . ($i+1) . "'></td></tr></tr>"; } echo "</tbody></table>"; }else{ echo "error in running query :". mysql_error(); } ?>

now need place check box in each row including <thead> , have create first column hyper link in each row. tried these not successful.

echo "<th style="width:8px;">"."<input type="checkbox" class="group-checkable" data-set="#sample_2 .checkboxes" />"."</th>"

for hyperlink tried this

echo "<td align='center' width='auto'><a>". $rows['asset id'] . "</a></td>";

for getting hyperlink columns.i need hyperlink 1 first column of table.

please help me in regard.

php mysql sql table

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -