submit function working

Here is the code that works for the submit button