while ($row = mysql_fetch_array($retval, MYSQL_ASSOC)) {
echo '<tr>';
echo '<td>' . $row['img_id'] . '</td>';
echo '<td>' . $row['picture'] . '</td>';
echo '<td>' . $row['category'] . '</td>';
echo '<td>' . $row['quantity'] . '</td>';
echo '<td>' . $row['title'] . '</td>';
echo '<td>' . $row['description'] . '</td>';
echo '<td><a class="btn btn-success" href="update.php?id=<?php echo $row[img_id];?>">Update</td>';
echo '<td><a class="btn btn-danger" href="deleteComfirm.php?id=<?php echo $row[img_id];?>">Delete</td>';
}
john khin
0
Newbie Poster
Recommended Answers
Jump to PostSame as you did with the
<td>
's.echo '<td><a class="btn btn-success" href="update.php?id='.$row['img_id'].'">Update</td>';
Also, don't use the mysql API, it's deprecated. Go with mysqli or PDO.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.