Hi Golith,
Do you need to accomplish this without a page reload? If not, why not just use php to execute like below?
I have edited only the form part of your code below:
// check if active or not then place right icon
echo " <form name=form method=post action=[filename].php>\n";
echo "<td align=center>" ?> <img src="http://www.hotscripts.com/forums/images/green_tick.png" width="30" height="30"><img src="http://www.hotscripts.com/forums/images/red_cross.jpg" width="30" height="30"> <?php "</td>";
echo "<td><input type = submit name = update value = update></td>";
echo "<td> <form><input type = submit name = del_file value = del_file ></td>";
echo "<td><input type = submit name = del_row value = del_row ></td>";
echo "</tr>";
echo "</form>\n";
Then, above the opening html tag:
if(!empty($_POST[update])) {
//perform relevant update
}
if(!empty($_POST[del_file])) {
//delete file from server
}
if(!empty($_POST[del_row])) {
//delete the row from the database
}
Good luck!