0

Hello Guys,
I am looking for some help: I have a dynamic table that shows a checkbox, id, title,etc., and date of insertion of an article that I've added before. And then I have a button that I would like to control if the user have clicked the checkbox and which ones to foward delete those articles that he choosed. I have some ideas how to do is but I need some help.

Here's a printscreen of the table:
http://img163.imageshack.us/img163/6977/tabletr.png

Here's the code of the table:

<?php do { ?>
     <tr>
	<td><input type="checkbox" /></td>
        <td><?php echo $row_RsNoticias['sn_id']; ?></td>
        <td align="center"><a href="ver_noticia.php?vernoticia=<?php echo $row_RsNoticias['sn_id']; ?>"><?php echo $row_RsNoticias['sn_titulo']; ?></a></td>
        <td><?php echo $row_RsNoticias['sn_status']; ?></td>
	<td><?php echo date('d/m/Y H:i:s', strtotime($row_RsNoticias['sn_data'])); ?> </td>
      	</tr>
<?php } while ($row_RsNoticias = mysql_fetch_assoc($RsNoticias)); ?>

Hope someone can help me.

Best Regards,
Andre Jordao

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Avenirer
0

You should do something with the checkboxes so that, after the user pushes the "aplicar", the articles he wants to delete to be stored in an array ($_POST['deletenoticias']).

<?php do { ?>
     <tr>
    <td><input type="checkbox" name="deletenoticias[]" value="<?php echo $row_RsNoticias['sn_id'];?>" /></td>
        <td><?php echo $row_RsNoticias['sn_id']; ?></td>
        <td align="center"><a href="ver_noticia.php?vernoticia=<?php echo $row_RsNoticias['sn_id']; ?>"><?php echo $row_RsNoticias['sn_titulo']; ?></a></td>
        <td><?php echo $row_RsNoticias['sn_status']; ?></td>
    <td><?php echo date('d/m/Y H:i:s', strtotime($row_RsNoticias['sn_data'])); ?> </td>
        </tr>
<?php } while ($row_RsNoticias = mysql_fetch_assoc($RsNoticias)); ?>

Edited by Dani: Formatting fixed

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.