(Please disregard any security concerns you may have with this approach, I have a already taken more than enough precautions to make sure that there are no blatant vulnerabilities with this approach)
In PHP, I have many values in a table, with a few buttons to perform javascript functions associated with that row.
Example:
<td id="row1" record="1">
<button id="button1" onclick="aFunction($(this).parent().attr('record'))">Do a function</button>
</td>
Are there any issues (besides those of security) with this approach of storing identification variables in the HTML attributes of a table row?
The W3C endorsed way to accomplish this is through HTML5 data-
attributes...
And from a security stand point, if this data is simply the id of the record in the DB...
You shouldn't be relying on the obscurity of your ids as a security measure.
As long as you have taken proper access control security measures, it should not, a security risk, be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With