yanks6rule wrote:Maybe I am not seeing the big security issue and if not I am sorry I am new to using sessions and making sure that all the holes are plugged so to speak.
let's say i am logged into your site and you only want me to be able to delete rows 1-5. your code will display a form to me that looks like this...
<form action="http://www.yanks6rule.com/form.php" method="post">
<input type="checkbox" name="delete[]" value="1"> row #1<br>
<input type="checkbox" name="delete[]" value="2"> row #2<br>
<input type="checkbox" name="delete[]" value="3"> row #3<br>
<input type="checkbox" name="delete[]" value="4"> row #4<br>
<input type="checkbox" name="delete[]" value="5"> row #5<br>
<input type="submit" name="submit" value="delete">
</form>
there is nothing to prevent me from altering the HTML source to this...
<form action="http://www.yanks6rule.com/form.php" method="post">
<input type="checkbox" name="delete[]" value="6"> row #6<br>
<input type="checkbox" name="delete[]" value="7"> row #7<br>
<input type="checkbox" name="delete[]" value="8"> row #8<br>
<input type="checkbox" name="delete[]" value="9"> row #9<br>
<input type="checkbox" name="delete[]" value="10"> row #10<br>
<input type="submit" name="submit" value="delete">
</form>
...then submitting the form to http://www.yanks6rule.com/form.php which will proceed to delete rows 6-10. in the form processing script you need to make sure that regardless of what is submitted you are only deleting records that the user is allowed to delete. again, if all users that you plan to authenticate can delete any row they want anyway then this is not much of a concern.