Merged php with the front end