I have POST input that I am performing some mysql queries with.
I am sanitizing that POST thoroughly before using it with my database queries...no problem there.
Now I think I want to start logging in a text file exactly what my users are putting in that input field ... just to get a better feel for what users are looking for. I am just writing to a txt file...got that covered..no issues
My question is... can I safely use the raw(pre-sanitized) POST data as my string that I am writing to that text file? I would also like to see if there is any funny business being posted there to test my site defenses... injection attempts, etc etc etc. I assume this is fine as I am just writing to a text file ... or am I completely wrong and this is a bad practice?
This won't be an indefinite data gathering on my input field, just for a bit to see what customers are looking for.