Used php to tie everything together