I am writing a programme i am printing from mysql with php in a table i want to get input field value by the help of jquery how can i get each input value using jquery.
<?php
$sql = "SELECT id, name, price, qty FROM appetisers";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
$quantity = $row["qty"];
if ($quantity == '' || $quantity == '0') {
$quantity = '1';
}
?>
<tr class="eachrow">
<td><?php echo $row["name"] ?></td>
<td class="price-amount">£ <?php echo $row["price"] ?></td>
<td><input type="text" name="amount" class="amount-type" value="<?php echo $quantity; ?>"/></td>
<td><a href="" class="add-cart">Add to cart</a></td>
</tr>
<?php }
}
?>