From this code.
When I click the button, There alert only the first record.
assume that I have 5 records 5 buttons, Each record's value = 3,4,5,6,7.
It's alert only first button value = 3, for another button when I clicked it not alert and not work.
            <?php while($data = mysql_fetch_array($qr)) {  ?>
            <tr>
                <td>
                <button id="btn" value="<?=$data['id']?>">ff</button>
                </td>
                <td><?=$data['schoolof']?></td>
                <td><?=$data['major']?></td>
                <td><?=$data['firstname'].' '.$data['lastname']?></td>
            </tr>
            <?php } ?>
            <script>
                $("#btn").click(function () {
                    alert($("#btn").val());
                });
            </script>