Sometimes I feel that the question's code can be improved in several ways, however I'm not sure of where the problem is. The problem might be more obvious if the code was better written.
Is it acceptable to put the code in a new answer with a disclaimer on top
Not a real answer, only some recommendations? Or should this be avoided?
In general, I feel like doing this in the situations where the code:
- Mixes HTML, PHP and Mysql all entangled (no SoC).
- Has some big vulnerabilities (SQL injection, md5() for passwords, etc).
- Using some deprecated functions (mysql_*)
- Using ifs that span several pages of height and several nested ones; KISS
Normally, when there's only a single problem from the above, I keep it a comment whether possible. However, if several of them have to be addressed or the extension of them is so big that cannot fit into a comment, is it okay to put this big comment into an answer with a disclaimer? If not, how should we deal with this type of situations?