Update ajax_generate.php