0
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>';

                    }
3
Contributors
2
Replies
13
Views
2 Years
Discussion Span
Last Post by sankar.s789
0

Same 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.

Edited by Traevel: quotes

0

Simply change Syntax to
echo '<td><a class="btn btn-success" href="update.php?id="'.<?php echo $row[img_id];?>.'">Update</td>';

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.