Confirmation popup error

Hey guys so currently I am working on a delete button for the administrators on the panel I am working on. I wanted to make it possible for them to delete users, and once they click the button a popup that is themed to the panel theme pops up asking to make sure they want to delete the user. Although I got it to partially work, it seems to be pulling the wrong user id and I’m not sure why? Here is the really poorly formatted code.

<?php echo $row['username']; ?>
        <td><?php echo $row['steamId']; ?></td>

        <td><?php if($row['online_status']): ?>

        <img style="width:20px; height:20px;" src="<?php echo SITE_URL; ?>includes/img/user-online.png" />

        <?php else: ?>

        <img style="width:20px; height:20px;" src="<?php echo SITE_URL; ?>includes/img/user-offline.png" />

        <?php endif; ?>

        </td>

        <td><?php echo $row1['logs']; ?> Cases</td>

        <td><?php echo $row['created']; ?></td>

        <td><?php echo $row['notes']; ?></td>

        <td><?php echo $row['strikes']; ?></td>

        <td><a href="<?php echo SITE_URL."l-6-edit.php?userId=".$row['id']; ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>&nbsp;&nbsp;<a  data-toggle="modal" data-target="#delete1"><i class="fa fa-trash-o"></i></a>

        <div class="modal fade" id="delete1">

                      <div class="modal-dialog">

                        <div class="modal-content">

                          <div class="modal-header">

                            <button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

                            <h4 class="modal-title">Delete?</h4>

                          </div>

                          <div class="modal-body">

                            <h5>Are you sure you want to Delete?</h5>

                          </div>

                          <div class="modal-footer">

                            <button class="btn btn-default" type="button" data-dismiss="modal">No</button>

                            <a href="<?php echo SITE_URL."l-dashboard.php?id=".$row['id']; ?>"> <button class="btn btn-primary" type="button">Yes, Delete!</button> </a>

                          </div>

                        </div>

                      </div>

                    </div></td>

3 posts were merged into an existing topic: Popup from database always on top?

Sponsor our Newsletter | Privacy Policy | Terms of Service