Extend your php trigger, with $_GET[variable] for the time being.
if($_POST[meh] == "some")
if($_POST[meh] == "some" or $_GET[meh] == "some")
From there you can stuff your variables in a url phppage.php that in a browser would result in the same results your ajax call receives, but then on screen.
Also enable displaying errors
error_reporting(E_ALL) <- willl show lots of progamming errors.
Also, after each mysql query type: echo mysl_error();
if you then check the results page through a manual action, it shows whats wrong with the mysql, if any.
Also, you could copy the mysql query, go to php myadmin, and perform a manual sql assignment. It could display errors in your query.