I have a table containing a triplist, which basically i want to be able to remove people from using a delete button. to avoid CSRF attacks i gather the best thing is to send the values to delete.php using a form.
so at the moment, for each of the rows i have:
The trouble is, with ~100 users this makes an unneccessarily large and slow page with all that for every row.
Im wondering if theres any way of maknig a confirmation box which then generates that code for the relevant user and submits it.
Maybe a javascript box which when ok is clicked will POST the values to del.php?
I know i can do it in a seperate page, but what about a facebook style thing?
thanks
so at the moment, for each of the rows i have:
Code:
echo "\t\t<form method=\"post\" action=\"del.php\">\n";
echo "\t\t<input type=\"hidden\" name=\"token\" value=\"$token\" />\n";
echo "\t\t<input type=\"hidden\" name=\"user_id\" value=\"".$user_id."\"/>\n";
echo "\t\t<input type=\"submit\" value=\"remove\" name=\"del\" />\n";
echo "\t\t</form>\n";
The trouble is, with ~100 users this makes an unneccessarily large and slow page with all that for every row.
Im wondering if theres any way of maknig a confirmation box which then generates that code for the relevant user and submits it.
Maybe a javascript box which when ok is clicked will POST the values to del.php?
I know i can do it in a seperate page, but what about a facebook style thing?
thanks
