I have a table with 7 columns and i have a php code that is used to fill up the table it is:
while($ad_table = mysqli_fetch_assoc($result)){
if(isset($ad_table['status'])){
if($ad_table['status'] == '0'){
$status = "paused";
}else if($ad_table['status'] == '1'){
$status = "users are viewing your site";
}
}
$no = $no + 1;
echo "<tr><td>{$no}</td><td>{$ad_table['name']}</td><td>{$ad_table['site']}</td><td>{$ad_table['hits']}</td><td id='status'>{$status}</td><td ><input type='text' name='id_ad' id='id{$no}' value='{$ad_table['id']}' /><td><div class='btn-group'><button type='button' class='btn btn-info' id='pause' value='pause{$no}' ><i class='fa fa-pause'></i> pause </button><button type='button' class='btn btn-info' id='edit' ><i class='fa fa-edit'></i> edit </button><button type='button' class='btn btn-danger' id='delete' ><i class='fa fa-delete'></i> delete </button></div></td></tr>";
}
} ?>
now the table will have a pause button,edit,delete button.i want the buttons to work with ajax jquery.But the problem is how to get the $ad_table['ad_id'] which is used to pause the ad with that id.Can anyone help me with this?I already lost a lot of time working with this.