Added PHP Functions and javascript functions