I need one help.I need to display values inside table using PHP and MySQL.I am explaining my code below.
<?php
$sql=mysql_query("select * from phr_pincode order by id desc");
while($row=mysql_fetch_array($sql)){
echo
'<tr>
<td></td>
<td>'.$row['pincode'].'</td>
<td>'.$row['area'].'</td>
<td>'.$row['status'].'</td>
<td>
<a>
<input type='button' class='btn btn-xs btn-green' value='Edit'">
</a>
</td>
<td>
<a>
<input type='button' class='btn btn-xs btn-red' value='Remove'>
</a>
</td>
</tr>';
}
?>
Here I am getting some syntax errors.I need here all data to display in a loop.I have left first row,it should take serial no (1,2,3....
) and for edit button i need to attach index.php
with the respective id after ?
inside anchor tag.