added ajax and json
new method to insert into database
added ajax code in index page
ajax auto load