Remove Table Row - Selected Users
Posted: Sun Apr 11, 2010 1:26 pm
Hey Gurus i have a problem i can not solve, i can not even begin to understand the theory to make this work so i can not start. I will explain the problem, i have a table created in php like so:
The table creates rows and each row has a unique job id, some users want some jobs to not show in this table ( like an ignore button i guess) so how would i make the table not show rows when users select that row to not appear, i know it can be done i just cant think of the logic 
So in short:
1. How can a user select a row/job id not to show in the table
2. How can the table react to that selection to not show the row/job id selected to ignore.
Hope its clear, thanks for reading.
Code: Select all
// START AN OUTPUT TABLE
echo "<table class='sample5'>";
// TITLE FOR COLUMNS
echo "<tr><td nowrap><b>Job Title</b></td><td align='center'><b>Edit</b></th><td align='center'><b>Status</b></th><td align='center'><b> Finished</b></th><td align='center'><b>View</b></th></tr>";
// ITERATE OVER THE RESULTS SET
while ($line = mysql_fetch_assoc($result))
{
// GET EASY-TO-READ LOCAL VARIABLES
foreach ($line as $key => $val) { $$key = htmlentities($val); }
// CREATE THE ROW OF DATA
echo "<tr>";
echo "<td width='50%'><a href='jobinfo.php?ID=$job_id'>" . substr($title,0,45) . "</a> </td>\n";
echo "<td width='10%' align='center'><a href='edit.php'><img src ='images/edit.gif'></a></td>\n";
// echo "<td width='10%' align='center'>$" . $perperson . "</td>\n";
echo "<td width='10%' align='center'>"; if ($approved == 0)
{
echo "<span style='color:#FF5F00;'><b>Pending</b></span>";
}
else{
echo "<img src ='images/statusrun.png'>";
}
"</img></td>\n";
echo "<td width='10%' align='center'><font color = 'green'><b>$amountcomplete</font></b></td>\n";
echo "<td width='20%' align='center'><a href=$job_id'><u>View </a></u></td>\n";
} // END WHILE ITERATOR
echo "</table>\n";So in short:
1. How can a user select a row/job id not to show in the table
2. How can the table react to that selection to not show the row/job id selected to ignore.
Hope its clear, thanks for reading.