server php code
when all finished, reload the page