-all three tables are auto generated
-communication between php and javascript using ajax