Initial code for collection management
Changed order of definitions
new collection form links to correct script
forgot to json_encode $error
function for create collection form submit