use xhr call api with php
format output from backend
use xhr send request with post method
add sql file for demo