I'm a beginner in PHP, and I'm having some trouble debugging AJAX, because I can't just print_r what I want to know inside the script.
I'm using a AJAX image upload plugin that have a lot of functions such as receive post, file check, etc, to finally get to the "insertTodatabase" funcion. I want to know what data is being sent to this final fuction, how can I echo the $_REQUEST of such function, for example?
I'm sorry if my question is vague, I'm doing my best to explain.
You can use the
error_log function to write data to your error log. Then just view your error log and you can have the information stored there.
error_log('UserName: ' . $username);