added main page
added name primary key, query type passed in from html elements