Changed input names
Added the capability to obtain the number of samples from the mysql database rather than requiring user input