added next button

created array to submit data and sorted