created functions for session/spinner php

functions use db php
functions retrieve and send to db
only data structure has been written, no algorithms yet