Submitting an HTML form from a module

How do I programmatically submit an HTML Form? Basically, I want my module to add a visit note. Thank you.