update ajax.php db connection function.