Updated Server Code

- Updated DB structure
- Updated PHP script to use new DB structure