Hiding row from loop

Hello

Ive got a while loop that outputs all the rows from a table.

I plan on putting a ‘hide’ button beside each row output. How do I remove a specific row when a user clicks ‘hide’

If it’s a non-essential function I’d just use JavaScript to hide the <tr>.

Are you using a JS library on your page (YUI, jQuery etc.)?

It all depends on if you’re wanting to hide it for good, or hide it for just that page load.

Depends on what it’s for. Is it only something one user is going to see? If so, have a column called “hidden” and update it, then select where hidden is not true.

If not,

I’m guessing one way if you’re wanting to hide it for good would to have a table…

hidden_rows. Have a couple of columns:

id, row_id, user_id.

Have row_id be linked to the id of the table, and user_id linked to the id of the users both cascading.

Then on display just join the tables and make sure that it’s not in that list.

Row(s) you wish to hide simply apply css class or inline style = ‘display:none;’
This you can do During loop