html to php, stated to add some backing functionality as well